Supervised environment controllable auto-generation of HTML

In an approach to generating HTML based on a plurality of content and design controls, one or more computer processors crawl one or more conforming websites. The one or more computer processors create a training set of crawled conforming webpages, wherein each crawled conforming webpage in the training set of crawled conforming webpages includes associated web code labeled a combination of respective one or more content controls and respective one or more design controls; encode the combination of the respective one or more design controls and the respective one or more content controls based on one or more user preferences utilizing a created design encoder and a created content encoder; create a decoder with the training set of crawled conforming webpages and associated encoded content and design vectors; generate web code based on the encoded design and content controls utilizing the created decoder; implement generated web code.

BACKGROUND

The present invention relates generally to the field of web development, and more particularly to hypertext markup language generation.

Hypertext Markup Language (HTML) is the standard markup language for documents designed to be displayed in a web browser. HTML can be assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaScript. Web browsers receive HTML documents from a web server or from local storage and render the documents into multimedia web pages. HTML describes the structure of a web page semantically and originally included cues for the appearance of the document. HTML elements are the building blocks of HTML pages. With HTML constructs, images, and other objects such as interactive forms may be embedded into the rendered page. HTML provides a means to create structured documents by denoting structural semantics for text such as headings, paragraphs, lists, links, quotes, and other items. HTML elements are delineated by tags, written using angle brackets. Tags such as <img /> and <input /> directly introduce content into the page. Other tags such as <p> surround and provide information about document text and may include other tags as sub-elements. Browsers do not display the HTML tags but use them to interpret the content of the page. HTML can embed programs written in a scripting language such as JavaScript, which affects the behavior and content of web pages and inclusion of CSS defines the look and layout of content.

In common ANN implementations, the signal at a connection between artificial neurons is a real number, and the output of each artificial neuron is computed by some non-linear function of the sum of its inputs. The connections between artificial neurons are called ‘edges’. Artificial neurons and edges typically have a weight that adjusts as learning proceeds. The weight increases or decreases the strength of the signal at a connection. Artificial neurons may have a threshold such that the signal is only sent if the aggregate signal crosses that threshold. Typically, artificial neurons are aggregated into layers. Different layers may perform different kinds of transformations on their inputs. Signals travel from the first layer (the input layer), to the last layer (the output layer), possibly after traversing the layers multiple times.

A recurrent neural network (RNN) is a class of ANN where connections between nodes form a directed graph along a sequence allowing the network to exhibit temporal dynamic behavior for a time sequence. Unlike feedforward neural networks, RNNs can use internal states (memory) to process sequences of inputs allowing the RNN to be applicable to tasks such as unsegmented connected handwriting recognition or speech recognition. Long short-term memory (LSTM) units are alternative layer units of a recurrent neural network (RNN). An RNN composed of LSTM units is referred as a LSTM network. A common LSTM unit is composed of a cell, input gate, output gate, and forget gate. The cell remembers values over arbitrary time intervals and the gates regulate the flow of information into and out of the cell. For an LSTM, the learning rate followed by the network size are the most crucial hyperparameters.

SUMMARY

Embodiments of the present invention disclose a computer-implemented method, a computer program product, and a system for generating web code based on a plurality of content and design controls. The computer-implemented method includes one or more computer processers creating a training set of crawled conforming webpages, wherein each crawled conforming webpage in the training set of crawled conforming webpages includes associated web code labeled a combination of respective one or more content controls and respective one or more design controls. The one or more computer processors encode the combination of the respective one or more design controls and the respective one or more content controls based on one or more user preferences utilizing a created design encoder and a created content encoder. The one or more computer processors create a decoder with the training set of crawled conforming webpages and associated encoded content and design vectors. The one or more computer processors generate web code based on the encoded design and content controls utilizing the created decoder. The one or more computer processors implement generated web code.

DETAILED DESCRIPTION

Automatic conversion of documents (presented in various formats) to HTML pages, that can be rendered in the form of websites, has been a continuing problem for web developers and users. However, no solution exists for generating a plurality of different variants of websites with varying content and styles from a document. Different variants of the website may be needed for a plurality of situational needs based on content requirements (what to present) and design choices (how to present). For example, a variant of a website meant for children may have content associated with increased readability as opposed to content shown to a domain expert. Similarly, a variant of a website will follow a different design for a visually impaired user than for a general audience.

Embodiments of the present invention identify environmental controls, defined by a user at runtime, that are imposed on a produced output. Embodiments of the present invention allow for generalizability, wherein the invention can be trained for any finite set of styles, audience, and content parameters, extendible to new situations. Embodiments of the present invention allow for a user to specify various controls to produce variants of the websites that can be deployed separately. In another embodiment of the present invention, a user while logging into a website, directly or indirectly specifies a plurality of controls, and corresponding web pages are dynamically generated and rendered. Embodiments of the present invention recognize that system efficiency is increased through the dynamic generation of web code. In this embodiment, system requirements are reduced due to a reduction of memory and storage requirements by generating web code variants on-the-fly instead of storing every variant statically. Embodiments of the present invention converts raw documents into web code variants. Implementation of embodiments of the invention may take a variety of forms, and exemplary implementation details are discussed subsequently with reference to the Figures.

FIG. 1is a functional block diagram illustrating a computational environment, generally designated100, in accordance with one embodiment of the present invention. The term “computational” as used in this specification describes a computer system that includes multiple, physically, distinct devices that operate together as a single computer system.FIG. 1provides only an illustration of one implementation and does not imply any limitations with regard to the environments in which different embodiments may be implemented. Many modifications to the depicted environment may be made by those skilled in the art without departing from the scope of the invention as recited by the claims.

Computational environment100includes computing device110and server computer120, interconnected over network102. Network102can be, for example, a telecommunications network, a local area network (LAN), a wide area network (WAN), such as the Internet, or a combination of the three, and can include wired, wireless, or fiber optic connections. Network102can include one or more wired and/or wireless networks that are capable of receiving and transmitting data, voice, and/or video signals, including multimedia signals that include voice, data, and video information. In general, network102can be any combination of connections and protocols that will support communications between computing device110, server computer120, and other computing devices (not shown) within computational environment100. In various embodiments, network102operates locally via wired, wireless, or optical connections and can be any combination of connections and protocols (e.g., personal area network (PAN), near field communication (NFC), laser, infrared, ultrasonic, etc.).

Computing device110may be any electronic device or computing system capable of processing program instructions and receiving and sending data. In some embodiments, computing device110may be a laptop computer, a tablet computer, a netbook computer, a personal computer (PC), a desktop computer, a personal digital assistant (PDA), a smart phone, or any programmable electronic device capable of communicating with network102. In other embodiments, computing device110may represent a server computing system utilizing multiple computers as a server system, such as in a cloud computing environment. In general, computing device110is representative of any electronic device or combination of electronic devices capable of executing machine readable program instructions as described in greater detail with regard toFIG. 4, in accordance with embodiments of the present invention. In the depicted embodiment, computing device110contains application112.

Application112is a set of one or more programs designed to carry out the operations for a specific application to assist a user to perform an activity (e.g., word processing programs, spread sheet programs, media players, web browsers). In the depicted embodiment, application112contains any software application utilized for accessing information on the World Wide Web. In this embodiment, when a user opens a web site, application112retrieves the necessary content from a web server then displays the resulting web page on computing device110. In the depicted embodiment, application112resides on computing device110. In another embodiment, application112may reside on server computer120or on another device (not shown) connected over network102.

Server computer120can be a standalone computing device, a management server, a web server, a mobile computing device, or any other electronic device or computing system capable of receiving, sending, and processing data. In other embodiments, server computer120can represent a server computing system utilizing multiple computers as a server system, such as in a cloud computing environment. In another embodiment, server computer120can be a laptop computer, a tablet computer, a netbook computer, a personal computer (PC), a desktop computer, a personal digital assistant (PDA), a smart phone, or any programmable electronic device capable of communicating with computing device110and other computing devices (not shown) within computational environment100via network102. In another embodiment, server computer120represents a computing system utilizing clustered computers and components (e.g., database server computers, application server computers, etc.) that act as a single pool of seamless resources when accessed within computational environment100. In the depicted embodiment, server computer120includes database122and program150. In other embodiments, server computer120may contain other applications, databases, programs, etc. which have not been depicted in computational environment100. Server computer120may include internal and external hardware components, as depicted, and described in further detail with respect toFIG. 4.

Database122is a repository for data used by program150. In the depicted embodiment, database122resides on server computer120. In another embodiment, database122may reside on computing device110or elsewhere within computational environment100provided program150has access to database122. A database is an organized collection of data. Database122can be implemented with any type of storage device capable of storing data and configuration files that can be accessed and utilized by program150, such as a database server, a hard disk drive, or a flash memory. In an embodiment, database122stores data used by program150, such as model fitness values including, but not limited to, predictive accuracy (e.g., Brier scores, Gini coefficients, discordant ratios, C-statistic values, net reclassification improvement indexes, generalized discrimination measures, etc.), error rates (e.g., root mean squared error (RMSE), mean absolute error, mean absolute percentage error, mean percentage error, etc.), precision, and related environment/system/server statistics (e.g., memory utilization, CPU utilization, storage utilization, etc.). In the depicted embodiment, program150contains corpus124.

Corpus124contains one or more examples, sets of training data, data structures, and/or variables used to fit the parameters of a specified model. In an embodiment, the contained training data comprises of pairs of input vectors (encoded control (e.g., content and design) parameters) with associated output vectors (generated HTML). In an embodiment, corpus124may contain one or more sets of one or more instances of unclassified or classified (e.g., labelled) data, hereinafter referred to as training statements. In another embodiment, training data contains an array of training statements organized in labelled training sets. In an embodiment, each training set includes a label and an associated array or set of training statements which can be utilized to train one or more models. For example, a plurality of training sets may include training statements containing websites comprising web code (HTML, CSS, JavaScript, etc.) as paired with associated control parameters (design and content controls) labels. In an embodiment, corpus124contains unprocessed training data. In various embodiments, corpus124contains vectorized (i.e., one-hot encoding, word embedded, dimension reduced, etc.) training sets, associated training statements, and labels. In another embodiment, corpus124contains a design corpus and a content corpus, each containing training statements for design elements (e.g., typographic aspects (e.g., font size, font color, font, line height, line length, etc.), image aspects (e.g., image size, color combinations, contrast, etc.) and content elements(e.g., readability (vocabulary, syntax, etc.), text, images, tables, charts, graphs, sensitive words, etc.), respectively.

Models152utilizes a plurality of deep learning techniques to learn a plurality of stylistic and content variations of a website. In another embodiment, models152contains transferrable neural networks algorithms and models (e.g., neural network, RNNs, long short-term memory (LSTM), deep stacking network (DSN), deep belief network (DBN), CNNs, correlational models, etc.) that can be trained with weakly supervised methods. Models152contain a plurality of encoders and decoders. In an embodiment, program150creates, trains, and maintains a design encoder and a content (e.g., demographic) encoder outputting one or more encoded vectors. In the depicted embodiment, said encoders are convolutional neural networks and/or recurrent neural networks (RNN). In another embodiment, models152contains one or more decoders capable of generating web code (e.g., HTML, CSS, JavaScript, etc.). In an embodiment, program150inputs content, design, and demographic specifications into one or more decoders contained in models152.

The models contained within models152, once trained, can generate web code based on raw documents and controls identified, aggregated, and fed by program150. In the depicted embodiment, the one or more decoders are RNNs. In various embodiments, models152contains a plurality of appropriateness scorers such as a design appropriateness scorer and content appropriateness scorer, respectively, capable of calculating a plurality of model losses utilized to modify and retrain one or more models contained within models152. In an embodiment, the scorers output a conformity score representing an extent that generated web code conforms to one or more design and content controls. In the depicted embodiment, the scorers are correlational neural networks. The training of models152is depicted and described in further detail with respect toFIG. 2.

Program150is a program for generating web code based on a plurality of content and design controls. In the depicted embodiment, program150is a standalone software program. In another embodiment, the functionality of program150, or any combination programs thereof, may be integrated into a single software program. In some embodiments, program150may be located on separate computing devices (not depicted) but can still communicate over network102. In various embodiments, client versions of program150resides on computing device110and/or any other computing device (not depicted) within computational environment100. Program150is depicted and described in further detail with respect toFIG. 2.

The present invention may contain various accessible data sources, such as database122, that may include personal storage devices, data, content, or information the user wishes not to be processed. Processing refers to any, automated or unautomated, operation or set of operations such as collection, recording, organization, structuring, storage, adaptation, alteration, retrieval, consultation, use, disclosure by transmission, dissemination, or otherwise making available, combination, restriction, erasure, or destruction performed on personal data. Program150provides informed consent, with notice of the collection of personal data, allowing the user to opt in or opt out of processing personal data. Consent can take several forms. Opt-in consent can impose on the user to take an affirmative action before the personal data is processed. Alternatively, opt-out consent can impose on the user to take an affirmative action to prevent the processing of personal data before the data is processed. Program150enables the authorized and secure processing of user information, such as tracking information, as well as personal data, such as personally identifying information or sensitive personal information. Program150provides information regarding the personal data and the nature (e.g., type, scope, purpose, duration, etc.) of the processing. Program150provides the user with copies of stored personal data. Program150allows the correction or completion of incorrect or incomplete personal data. Program150allows the immediate deletion of personal data.

In various embodiments, the term “web code” should be construed having a broad meaning and should include all types of programmatic code. Non-limiting examples of web code include: HTML, CSS, JavaScript, text files, documents, and a plurality of server-side code such as PHP, python, etc. In another embodiments, web code refers to a webpage either in un-rendered or rendered form. In various embodiments, the term “HTML” should be construed having a broad meaning and should include all types of web code, as described above.

FIG. 2is a flowchart depicting operational steps of program150for generating web code based on a plurality of content and design controls, in accordance with an embodiment of the present invention.

Program150crawls conforming website (step202). In an embodiment, program150initiates in response to a web request utilizing a web browser (e.g., application112). In another embodiment, program150initiates in response to a provided uniform resource link (URL) or raw document (e.g., text file, document, un-stylized HTML document, etc.). In an embodiment, program150receives, retrieves, or determines one or more hyperlinks to one or more websites that contain one or more design elements and one or more content elements that conform with a plurality of controls (design and content parameters). In an embodiment, program150utilizes one or more web-crawlers processing a set of URLs to visit. In this embodiment, as a web-crawler visits said URLs contained in the URLs to visit set, program150identifies all hyperlinks contained in one or more webpages, recursively adding the identified URLs to the set of URLs to visit. The web-crawler copies and saves each visited webpage (e.g., associated web code and labels). In an embodiment, program150maintains a snapshot of each visited page. Program150abides by a plurality of procedures for web-crawling as dictated by a website and an associated robots.txt file. For example, a robots.txt file can request web-crawlers to retrieve (e.g., index.) only specific sections of a website, or nothing at all.

Program150attaches one or more conforming design and/or content as labels to one or more crawled webpages (e.g., decomposed web code). For example, a web-crawler, utilized by program150, crawls a set of news webpages for content elements regarding contemporary topics and design elements containing visual aid design principles. In an embodiment, program150creates training sets containing sections of crawled web code decomposed into composite content (e.g., elements pertaining to topics, sections of raw text, etc.) and design elements (e.g., elements pertaining to visual components, etc.) associated as labels. In various embodiments, program150creates a set of crawled conforming webpages where each crawled conforming webpage includes one or more content elements, and one or more design elements labelled with associated web code. Program150extracts various components from the crawled website, yielding a dataset containing instances of sets and/or vectors, for example <control, design label, content label, web code>. In various embodiment, program150creates one or more training sets from the crawled webpages.

Program150creates a design encoder and a content encoder (step204). Program150creates and trains one or more models (encoders, scorers, decoders) contained within models152by feeding one or more labelled vectors. In an embodiment, program150initializes models152(e.g., design encoders, content encoders, decoder, scorers) with randomly generated weights. In yet another embodiment, program150performs supervised training with labeled vectorized data contained within corpus124. For example, program150feeds web code and encoded controls, allowing program150to make inferences between web code and controls (design and content parameters). Program150utilizes processed training sets to perform supervised training of one or more model contained within models152. In an embodiment, program150trains said models with a plurality of feature vectors originating from control parameters extracted from historical crawled conforming websites stored within corpus124. In various embodiments, supervised training determines the difference between a prediction and a target (i.e., the error), and back-propagates the difference through the layers such that models152“learns”. In an embodiment, program150utilizes stochastic gradient algorithms to implement backpropagation. In various embodiment, program150utilizes losses calculated by a plurality of design appropriateness scorers and content appropriateness scorers. In an embodiment, program150utilizes generation loss that captures how different generated web code is from reference web code. Here, the generation loss function utilizes categorical cross entropy. In another embodiment, program150utilizes content specific loss capturing the extent that generated web code has been adjusted based on content (e.g., demographic) controls and requirements. In this embodiment, the content specific loss is generated by a trained content appropriateness scorer. In yet another embodiment, program150utilizes design specific loss capturing the extent that generated web code has been adjusted based on design controls and requirements. In this embodiment, the design specific loss is generated by a trained design appropriateness scorer.

Program150creates and trains a design encoder and a content encoder utilizing the crawled websites and associated labels as training data (e.g., design corpus and content corpus contained within corpus124). In an embodiment, the design encoder and content encoder are recurrent neural networks and/or convolutional neural networks trained with unsupervised training methods. Program150creates and trains a design appropriateness scorer and a content appropriateness scorer. Responsive to program150completing (e.g., convergence, minimizing of losses, etc.) training of the aforementioned encoders and scorers, program150determines a fitness level for each encoder and scorers. If the encoders and scorers are not well trained, then program150returns to training. In an embodiment, program150adjusts corpus124and retrains the encoders and scorers.

Program150creates a decoder utilizing the created design and content encoders (step206). Program150creates and trains a decoder utilizing supervised training methods, as described in step206. Program150trains the decoder utilizing training sets containing encoded vectors and control parameters as labels. In an embodiment, program150inputs encoded design and content vectors, generated from design and content encoders, into a trained decoder, allowing program150to generate web code conforming to the encoded design and content vectors. In various embodiments, a trained decoder utilizes generation loss, as described in step204.

Program150encodes design and content controls (step208). In various embodiments, program150acts as an inline proxy and/or a transparent proxy ‘sitting’ in between a computing device and the destination repository. In this embodiment, all network traffic to and from computing device110will travel through program150. In another embodiment, program150monitors application112(e.g., browser) activity to determine a network transfer (e.g., hypertext transfer protocol (HTTP requests, etc.)). In an embodiment, program150identifies a HTTP request and pauses, delays, suspends, or halts the request until program150generates web code, as detailed below in step210. In various embodiments, program150replaces and/or substitutes a graphical transmission icon within a user interface (not depicted). For example, browser applications (e.g., application112) have graphical icons that when activated transmit a web request (e.g., network request). In this example, program150replaces one or more icons, with the respective triggers, to intercept and retain the URL before transmission. In yet another embodiment, program150may analyze outbound traffic of client computing device110to detect a transmission of a web request. In this embodiment, program150may retain the request until the associated web code is analyzed. In yet another embodiment, program150detects a URL by detecting a user entering words in application112. In an embodiment, program150receives a requested URL and crawls one or more associated webpages, analyzes the crawled webpage, and decomposes the webpage into one or more web code components (e.g., text, images, charts, HTML, CSS, JavaScript, etc.).

In various embodiments, program150retrieves one or more user preferences dictating preferred and required design and content controls. For example, a user may have color sensitivity preferences, thus program150adjusts one or more design controls to conform with the color sensitivity preferences of the user. In an embodiment, user preferences are associated with a user system, browser, profiles, and/or any other applications. For example, when a user visits a web page, program150retrieves one or more user preferences associated with one or more design and content controls. Program150retrieves and/or receives targeted design and content considerations and encodes said considerations, utilizing the trained design and content encoders, as encoded control vectors. In various embodiments, program150utilizes encoded control vectors as distributed representations of web code and text that conforms with one or more design and content labels. In an embodiment, program150determines one or more user characteristics (e.g., demographic information (e.g., age, gender, profession, knowledge level, etc.), visualizations concerns (e.g., limited vision, hearing, etc.)) to determine appropriate content controls. In another embodiment, a webpage contains one or more default design and content controls.

Program150generates HTML based on encoded controls utilizing the created decoder (step210). In an embodiment, program150generates conforming web code based on encoded design and content controls utilizing trained design and content encoders. Program150utilizes the trained decoder, as described in step206, to output one or more sequences of web code based on one or more inputted encoded design and content control vectors. Program150utilizes the trained decoder and the learned weights and layers to predict and generate web code in a sequence given a target sequence (web code, design and content encoded controls). In one embodiment, utilizing the output of a decoder, program150generates a series of terms (web code) and associated probabilities. Said probabilities denote the chance that a generated term is a correct next term in a sequence. In an embodiment, program150utilizes a softmax layer in order to normalize the input vector (e.g., one-hot encoded and vectorized inputs, etc.) of K real numbers into a probability distribution consisting of K probabilities. In this embodiment, the softmax layer converts the output vector (e.g., predicted sequence) into a probability contained in the interval (0, 1), for example 0.58 or 58%. In an embodiment, program150selects the most probable web code (e.g., the web code with the highest attached probability). In another embodiment, program150prompts the user with the top generated webpage variant (e.g., assembled and rendered web code) and allows a user to select most conforming variant. In a further embodiment, program150prompts the user if no generated web code meets a predetermined probability threshold. For example, if a probability threshold is set at a 50% and no generated web code has a probability greater than 50%, then program150prompts the user with a list of variant webpages. In yet another embodiment, responsive to the generation of web code, program150appends the generated web code to the end of the sequence of web code and feeds the new sequence into the decoder for the generation of subsequent web code. In various embodiments, program150halts feeding sequences and vectors into a decoder if the probability of all generated web code falls under a predetermined probability threshold level, for example 50%. In said embodiments, program150utilizes design and content appropriateness scorers to generate one or more conformity probabilities and related scores (e.g., conformity score). In an embodiment, program150retrains one or more models contained in models152if one or more scores are insufficient (e.g., below a determined threshold (e.g., score or probability), etc.).

Program150utilizes a trained decoder to adjust one or more decomposed web code components (e.g., elements) to create conforming web code based on one or more encoded controls (e.g., design and content). In a further embodiment, program150utilizes a decoder to generate conforming web code by adjusting crawled webpages. In this embodiment, program150may adjust one or more elements to provide text alternatives for any non-text content convertible to alternative presentation methods such as large print, braille, speech, or symbols, provide alternatives for time-based media, avoiding elements known to cause seizures, adjusting text content to be more readable and understandable, adjust content to be presented in different ways (for example a simpler layout) without losing information or structure, adjusting web code to make it easier for users to see and hear content (for example separating foreground from background), creating keyboard functionality, providing users enough time to read and use content, providing methods to help users navigate, find content, and determine where they are (e.g., navigation controls), facilitate webpages to operate in predictable ways, and maximize compatibility with current and future user agents, including assistive technologies. For example, program150creates or adjusts a set of content controls that reduce a reading level of content on a web page. In this example, the control may adjust one or more terms to alternative terms that conform with a reading level of a user. In another embodiment, program150may increase content complexity when a user is an experienced reader or an expert in a related field. In another example, program150may generate, adjust, modify, transform, and/or present the appearance of a plurality of stylistic elements of web code (e.g., rendered website). In an embodiment, said plurality may include; adjustments to font, font size, character style (e.g., bold, italics, font color, background color, superscript, subscript, capitalization, etc.), general transparency, relative transparency, etc. For example, program150, responsive to design control regulating seizure inducing colors, generates web code (specifically CSS code) that conforms to a set of “safe” colors.

Program150presents the generated HTML (step210). In an embodiment, program150deploys generated web code to one or more webservers. In this embodiment, program150may maintain one or more generated variants of a website, each with separated web code specific to a variant. In another embodiment, program150maintains a plurality of generated variants, each sharing and building off a base, neutral webpage (e.g., web code stripped of any design elements). In various embodiments, program150modifies and presents (e.g., implements) existing web code. In an embodiment, program150, dynamically, modifies displayed webpages based on generated web code. For example, program150may not have access to one or more webservers, thus program150receives web code transmitted to a user, via a browser, and dynamically adjusts and presents the modified webpage. In another embodiment, program150presents the generated web code on one or more web browsers. In various embodiments, program150adjusts existing web code utilizing the generated web code. Program150may output generated web code into a plurality of suitable formats such as text files, HTML files, CSS files, JavaScript files, documents, spreadsheets, etc. In yet another embodiment, program150adjusts all webpages rendered on application112(e.g., web browser). For example, every webpage, that a user visits, is dynamically adjusted to conform with one or more design and content controls dictated by the user.

FIG. 3depicts example300, which is an example generation of web code based on a plurality of controls, in accordance with an illustrative embodiment of the present invention. Example300includes document302, a raw document or existing nonconforming web code, design control304, a encoded vector of one or more user preferences controlling one or more design aspects, content control306, an encoded vector of one or more user preferences controlling one or more content aspects, generated HTML308, conforming web code generated by inputting document302, design control304, and content control306into a trained decoder.

Computing device110and server computer120each include communications fabric404, which provides communications between cache403, memory402, persistent storage405, communications unit407, and input/output (I/O) interface(s)406. Communications fabric404can be implemented with any architecture designed for passing data and/or control information between processors (such as microprocessors, communications, and network processors, etc.), system memory, peripheral devices, and any other hardware components within a system. For example, communications fabric404can be implemented with one or more buses or a crossbar switch.

Memory402and persistent storage405are computer readable storage media. In this embodiment, memory402includes random access memory (RAM). In general, memory402can include any suitable volatile or non-volatile computer readable storage media. Cache403is a fast memory that enhances the performance of computer processor(s)401by holding recently accessed data, and data near accessed data, from memory402.

Program150may be stored in persistent storage405and in memory402for execution by one or more of the respective computer processor(s)401via cache403. In an embodiment, persistent storage405includes a magnetic hard disk drive. Alternatively, or in addition to a magnetic hard disk drive, persistent storage405can include a solid-state hard drive, a semiconductor storage device, a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, or any other computer readable storage media that is capable of storing program instructions or digital information.

The media used by persistent storage405may also be removable. For example, a removable hard drive may be used for persistent storage405. Other examples include optical and magnetic disks, thumb drives, and smart cards that are inserted into a drive for transfer onto another computer readable storage medium that is also part of persistent storage405.

Communications unit407, in these examples, provides for communications with other data processing systems or devices. In these examples, communications unit407includes one or more network interface cards. Communications unit407may provide communications through the use of either or both physical and wireless communications links. Program150may be downloaded to persistent storage405through communications unit407.

I/O interface(s)406allows for input and output of data with other devices that may be connected to computing device110and server computer120. For example, I/O interface(s)406may provide a connection to external device(s)408, such as a keyboard, a keypad, a touch screen, and/or some other suitable input device. External devices408can also include portable computer readable storage media such as, for example, thumb drives, portable optical or magnetic disks, and memory cards. Software and data used to practice embodiments of the present invention, e.g., program150, can be stored on such portable computer readable storage media and can be loaded onto persistent storage405via I/O interface(s)406. PO interface(s)406also connect to a display409.