Method and apparatus for natural language document orchestrator

Methods, apparatuses, and computer program products are described herein that are configured to be embodied as a natural language document orchestrator. In some example embodiments, a method is provided that comprises generating natural language text. The method of this embodiment may also include executing document orchestration requests from a scripted input language file.

TECHNOLOGICAL FIELD

Embodiments of the present invention relate generally to natural language generation technologies and, more particularly, relate to a method, apparatus, and computer program product for orchestrating a document into natural language text.

BACKGROUND

In some examples, a natural language generation (NLG) system is configured to transform raw input data that is expressed in a non-linguistic format into a format that can be expressed linguistically, such as through the use of natural language. For example, raw input data may take the form of a value of a stock market index over time and, as such, the raw input data may include data that is suggestive of a time, a duration, a value and/or the like. Therefore, an NLG system may be configured to input the raw input data and output text that linguistically describes the value of the stock market index; for example, “Securities markets rose steadily through most of the morning, before sliding downhill late in the day.”

Data that is input into a NLG system may be provided in, for example, a recurrent formal structure. The recurrent formal structure may comprise a plurality of individual fields and defined relationships between the plurality of individual fields. For example, the input data may be contained in a spreadsheet or database, presented in a tabulated log message or other defined structure, encoded in a ‘knowledge representation’ such as the resource description framework (RDF) triples that make up the Semantic Web and/or the like. In some examples, the data may include numerical content, symbolic content or the like. Symbolic content may include, but is not limited to, alphanumeric and other non-numeric character sequences in any character encoding, used to represent arbitrary elements of information. In some examples, the output of the NLG system is text in a natural language (e.g. English, Japanese or Swahili), but may also be in the form of synthesized speech.

BRIEF SUMMARY

Methods, apparatuses, and computer program products are described herein that are configured to be embodied as and/or performed by a natural language document orchestrator. In one example embodiment, a method comprises accessing a scripted input language file, wherein the scripted input language file comprises one or more document orchestration requests. The method of this embodiment may also include parsing the one or more document orchestration requests by a processor, wherein each document orchestration request comprises an identification of a document orchestration module of one or more document orchestration requests and formatted instructions for execution by the document orchestration module. The method of this embodiment may further include executing the one or more document orchestration requests by invoking the document orchestration module, passing the document orchestration module the formatted instructions, receiving a natural language output from the document orchestration module, and processing the natural language output to generate natural language text. The method of this embodiment may also further include, determining that all document orchestration requests of the parsed input language file have executed and outputting natural language text via an output text processor.

In one example embodiment an apparatus comprises at least one processor; and at least one memory including computer program code. In the apparatus of this embodiment, the at least one memory and the computer program code are configured to, with the at least one processor, cause the apparatus to at least access a scripted input language file, wherein the scripted input language file comprises one or more document orchestration requests. In the apparatus of this embodiment, the at least one memory and the computer program code are further configured to, with the at least one processor, cause the apparatus to parse the one or more document orchestration requests by a processor, wherein each document orchestration request comprises an identification of a document orchestration module of one or more document orchestration requests and formatted instructions for execution by the document orchestration module. In the apparatus of this embodiment, the at least one memory and the computer program code are configured to, with the at least one processor, cause the apparatus to execute the one or more document orchestration requests by invoking the document orchestration module, passing the document orchestration module the formatted instructions, receiving a natural language output from the document orchestration module, and processing the natural language output to generate natural language text. In the apparatus of this embodiment, the at least one memory and the computer program code are further configured to, with the at least one processor, cause the apparatus to determine that all document orchestration requests of the parsed input language file have executed and output natural language text via an output text processor.

In one example embodiment, a computer program product comprises at least one computer readable non-transitory memory medium having program code instructions stored thereon. In the computer program product of this embodiment, the program code instructions, when executed by an apparatus, cause the apparatus at least to access a scripted input language file, wherein the scripted input language file comprises one or more document orchestration requests. In the computer program product of this embodiment, the program code instructions, when executed by an apparatus, further cause the apparatus to parse the one or more document orchestration requests by a processor, wherein each document orchestration request comprises an identification of a document orchestration module of one or more document orchestration requests and formatted instructions for execution by the document orchestration module. In the computer program product of this embodiment, the program code instructions, when executed by an apparatus, further cause the apparatus to execute the one or more document orchestration requests by invoking the document orchestration module, passing the document orchestration module the formatted instructions, receiving a natural language output from the document orchestration module, and processing the natural language output to generate natural language text. In the computer program product of this embodiment, the program code instructions, when executed by an apparatus, further cause the apparatus to determine that all document orchestration requests of the parsed input language file have executed and output natural language text via an output text processor.

In one example embodiment, an apparatus includes means for accessing a scripted input language file, wherein the scripted input language file comprises one or more document orchestration requests. The apparatus of this embodiment may further include means for parsing the one or more document orchestration requests by a processor, wherein each document orchestration request comprises an identification of a document orchestration module of one or more document orchestration requests and formatted instructions for execution by the document orchestration module. The apparatus of this embodiment may also further include means for executing the one or more document orchestration requests by invoking the document orchestration module, passing the document orchestration module the formatted instructions, receiving a natural language output from the document orchestration module, and processing the natural language output to generate natural language text. The apparatus of this embodiment may also further include means for determining that all document orchestration requests of the parsed input language file have executed and outputting natural language text via an output text processor.

DETAILED DESCRIPTION

Example embodiments will now be described more fully hereinafter with reference to the accompanying drawings, in which some, but not all embodiments are shown. Indeed, the embodiments may take many different forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will satisfy applicable legal requirements. Like reference numerals refer to like elements throughout. The term “exemplary”, as may be used herein, is not provided to convey any qualitative assessment, but instead merely to convey an illustration of an example. Thus, use of any such terms should not be taken to limit the spirit and scope of embodiments of the present invention.

In some examples, a standard method to generate natural language text may make full use of a natural language pipeline, such as an example natural language generation pipeline (e.g., document planning, microplanning, and realizing) described in Building Natural Language Generation Systems by Ehud Reiter and Robert Dale, Cambridge University Press (2000), which is incorporated by reference in its entirety herein. Such a natural language pipeline may require a specific input such as raw data, such as raw data (or non-linguistic data) describing weather information, and then processing the raw data into natural language text describing the data. Indeed, the pipeline, in such examples, is configured to transform the non-linguistic data into a linguistic text, sometimes requiring the text to be processed by each step of the aforementioned natural language generation pipeline.

However, in natural language generation, it may not always be necessary to utilize each of the steps or modules of a natural language pipeline to generate natural language text. For example, an input, such as text based input, may already be processed to some extent and only require additional morphology processing. In other examples, a sentence may be provided, requiring only minor text processing to account for verb or adjective inflection. In such cases, the processing of the input through an each step of the natural language pipeline would be unneeded.

In some example embodiments, a document orchestrator, such as the document orchestrator described herein, is configured to allow developers to write a script which invokes NLG services at different levels. In some examples, this may include producing a text from a document plan (utilizing a full NLG pipeline), microplanning and realizing a single message (utilizing a NLG pipeline which skips document planning), or generating the text for a syntactic constituent, such as a verb group (e.g., producing “will not eat”).

In some example embodiments, the document orchestrator invokes NLG services with a script and will output orchestrated NLG text. In some examples, the orchestrated text is the output of an NLG service called by the document orchestrator, which completes the natural language pipeline. In some examples, the orchestrated text is the output of a single service where a full NLG pipeline is not invoked, such as returning the plural form of a noun (e.g. utilizing a morphology service to produce “children” from child).

In the embodiments, described herein, each NLG service or document orchestration module is configured to receive varying levels of input from structured natural language service inputs, such as document plans or text specifications (realization elements), and/or unstructured natural language service inputs, such as strings, messages, and/or words. Furthermore, each NLG service or document orchestration module is also configured to output varying levels of output from orchestrated structured natural language service outputs, such as document plans or text specifications (realization elements), and/or unstructured natural language service outputs such as orchestrated strings, messages, and/or words.

In some example embodiments, the document orchestrator, is configured to analyze an input script to determine whether to utilize portions of a natural language pipeline based on a given input. Advantageously, and in some examples, the document orchestrator is able to perform, or cause to perform, the appropriate (or requested) level of processing to generate natural language text based on the input script. In some examples, the level of processing may include the entire natural language generation pipeline, whereas, in other examples only a portion of said pipeline is required.

Finally, in some examples, the document orchestrator is configured to generate text, based on the input script, and a determined context in which the generated text will be placed. For example, the orchestrator may perform referring expression generation based on the previously generated text. In other examples, the document orchestration system may generate text in a particular tense based on the preceding text. To orchestrate a document and generate language in the context of the text already generated, provides an additional advantageous feature of some example embodiments described herein.

FIG. 1is an example block diagram of example components of an example Natural Language Generation Environment100. In some example embodiments, the Natural Language Generation Environment100comprises a Natural Language Generation Service101. The Natural Language Generation Service101may take the form of, for example, a code module, a component, circuitry and/or the like. The components of the Natural Language Generation Environment100are configured to provide various logic (e.g. code, instructions, functions, routines and/or the like) and/or services related to a natural language document orchestrator. Other natural language generation services may be used in some example embodiments, such as a natural language generation system as described in Building Natural Language Generation Systems by Ehud Reiter and Robert Dale, Cambridge University Press (2000).

In some example embodiments, Natural Language Generation Environment100may also comprise a Content/Data Store120, and a Scripted Input File150. The scripted input file can rely on a number of scripting languages, and comprises a series of tasks to be performed by the Scripted File processor155. In some example embodiments, Scripted Input File150may comprise one or more document orchestration requests (e.g., a request for processing of an input by the Document Orchestrator110).

In some examples, Content/Data Store120may comprise memory to store output components of a natural language document orchestrator. In some example embodiments, Content/Data Store120may comprise content accessible to a natural language document orchestrator to aid in the generation of natural language text, such as a natural language lexicon. A lexicon is a “dictionary” for stored words of a particular language. It identifies the part of speech and other information about words. A lexicon may also include information concerning morphological inflections, syntactic features (such as transitive verbs), whether to include “a” or “an” before a given word, and spelling variants of a single word (such as “colour” and “color”).

Alternatively or additionally, the Content/Data Store120may also store messages, which are language independent data structures that correspond to informational elements in a text and/or collect together underlying data, referred to as slots, arguments or features, which can be presented within a fragment of natural language such as a phrase or sentence. Messages may be represented in various ways; for example, each slot may consist of a named attribute and its corresponding value; these values may recursively consist of sets of named attributes and their values, and each message may belong to one of a set of predefined types.

Alternatively or additionally, the Content/Data Store120may also comprise an ontology (e.g. a domain model) that formally represents knowledge about the application scenario. In some examples, the domain model is a representation of information about a particular domain. For example, a domain model may contain an ontology that specifies the kinds of objects, concepts and/or the like that may exist in the domain in concrete or abstract form, properties that may be predicated of the objects, concepts and the like, relationships that may hold between the objects, concepts and the like, and representations of any specific knowledge that is required to function in the particular domain.

Alternatively or additionally, the Content/Data Store120may also store the relevant aspects of a discourse context, such as a list of entities mentioned in the text so far, to include the lexicalization of the previous sentence in a text, parameters set by the document planner, genre parameters and/or the like. Alternatively or additionally, a discourse context may be stored as a separate data structure apart from the Content/Data Store120to be accessible for operations outside of the Content/Data Store120.

In some example embodiments, a natural language generation service, such as Natural Language Generation Service101comprises a Document Orchestrator110, In some examples, Document Orchestrator110is configured to generate phrases, sentences, text or the like which may take the form of natural language text. In some example embodiments, Document Orchestrator110may generate a natural language output text, such as Output Text165.

In some example embodiments, Document Orchestrator110comprises a scripted filed processor, such as Scripted File Processor155, an output text processor, such as Output Text Processor160, and one or more document orchestration modules. For example, the one or more document orchestration modules may comprise a content query processor, such as Content Query Processor111, a document plan processor, such as Document Plan Processor112, a microplanner processor, such as Microplanner Processor113, a syntax processor, such as Syntax Processor114, a morphology processor, such as Morphology Processor115, a morphophonology processor, such as Morphophonology Processor116, an orthography processor, such as Orthography Processor117, and a mark-up processor, such as Mark-Up Processor118. In alternative examples, other natural language generation modules may be used.

In some examples, Content Query Processor111, may be configured to query the Content/Data store120that comprises one or more messages and/or raw input data.

In some examples, messages are language independent data structures that correspond to informational elements in a text and/or collect together underling data in such a way that the underlying data can be linguistically expressed. In some examples, messages are created based on a requirements analysis as to what is to be communicated for a particular scenario (e.g. for a particular domain). A message typically corresponds to a fact about the underlying data (for example, the existence of some observed event) that could be expressed via a simple sentence (although it may ultimately be realized by some other linguistic means). For example, to linguistically describe wind, a user may want to know a speed, a direction, a time period or the like, but also the user wants to know changes in speed over time, warm or cold fronts, geographic areas and or the like. In some cases, users do not even want to know wind speed; they simply want an indication of a dangerous wind condition. Thus, a message related to wind speed may include fields to be populated by data related to the speed, direction, time period or the like, and may have other fields related to different time points, front information or the like. The mere fact that wind exists may be found in the data, but to linguistically describe “light wind” or “gusts” different data interpretation must be undertaken as is described herein.

In some examples, a message is created in an instance in which the raw input data or the historical data warrants the construction of such a message. For example, a wind message would be constructed in an instance in which wind data was present in the raw input data. Alternatively or additionally, while messages may correspond directly to observations taken from the raw data input, others, however, may be derived from the observations by means of a process of inference. For example, the presence of rain may be indicative of other conditions, such as the potential for snow at some temperatures.

The concepts and relationships that make up messages may be drawn from an ontology (e.g. a domain model) that formally represents knowledge about the application scenario. For example, message structures may be defined based on a particular alert condition and/or the raw input data, such as but not limited to the primary and/or related data channels. Messages may also be derived from another data structure, may be user defined and/or the like. Each type of message may also be represented by a message template, which expresses a relationship between instances of a number of concepts; the message template contains slots which may be filled in, or instantiated, using particular values that are derived from the raw input data.

In some examples, a document plan processor, such as Document Plan Processor112, is configured to input the one or more messages and/or formatted instructions and arrange them. The Document Plan Processor112may also comprise a structuring process that determines the order of messages referring to the key events and/or significant events to be included in a natural language text. In some example embodiments, the Document Plan Processor112may access one or more text schemas for the purposes of content determination and document structuring. A text schema is a rule set that defines the order in which a number of messages are to be presented in a document. The output of the Document Plan Processor112may be a tree-structured object or other data structure that is referred to as a document plan. In an instance in which a tree-structured object is chosen for the document plan, the leaf nodes of the tree may contain the messages, and the intermediate nodes of the tree structure object may be configured to indicate how the subordinate nodes are related (e.g. elaboration, consequence, contrast and/or the like) to each other.

In some examples, a microplanner processor, such as Microplanner Processor113, is configured to create one or more texts or realization elements from one or more messages, such that messages may be further processed to be expressed in natural language.

In some example embodiments, the Microplanner Processor113may perform aggregation, lexicalization, and referring expression generation. In some examples, aggregation includes, but is not limited to, determining whether two or more messages can be combined together linguistically to produce a more complex sentence. The output of the Microplanner Processor113, in some example embodiments, is a tree-structured text specification whose leaf-nodes form realization elements (or phrase specifications), and whose internal nodes express rhetorical relations between the leaf nodes.

A realizer (not shown) comprises one or more of a syntax processor, such as Syntax Processor114, a morphology processor, such as Morphology Processor115, a morphophonology processor, such as Morphophonology Processor116, an orthography processor, such as Orthography Processor117, and a mark-up processor, such as Mark-Up Processor118. In one example, the realizer may be invoked directly from the Document Orchestrator110. For example, a user can request the plural form of a word by calling a getPlural service with the base form of the word as a parameter (e.g., getPlural (“child”) returns “children”).

Alternatively or additionally, the realizer may be configured to traverse the tree-structured text specification to express the tree-structured text specification in natural language. The realization process that is applied to each phrase specification in a text specification makes use of a grammar which specifies the valid syntactic structures in the language and further provides a way of mapping from text specifications into the corresponding natural language sentences. The output of the process is, in some example embodiments, a well-formed natural language text.

The Syntax Processor114is configured, in some example embodiments, to access an input, and apply syntactic rules to generate natural language. For example, Syntax Processor114may be configured to perform verb group formation (e.g., VerbGroup(“eat”, PAST) returns “ate” and VerbGroup (“eat”, FUTURE, NEGATED) returns “will not eat”).

The Syntax Processor114is further configured, in some examples, to at least add closed class function words such as conjunctions (and, or), articles (a, the), demonstratives (this, that) and prepositions (to, from, at, with). In some embodiments, the Syntax Processor114is also configured to add morphological inflections. In some embodiments, the Syntax Processor114is also configured to propagate features in a realization element.

The Morphology Processor115is configured, in some example embodiments, to access an input, and apply morphology rules to generate natural language. For example, the Morphology Processor115may be configured to return inflected word forms from input base word forms, such as by returning words in an inflected word form according to a language morphology rule file. By way of example, given an input “John, love, mango,” wherein mango includes the plural feature (i.e., mango[number: plural]), the Morphology Processor115is configured to output “John loves mangoes.” The morphing of love and mango from the base form to the inflected form is morphology. Alternatively or additionally, the Morphology Processor115may map inflected word forms to base word forms prior to mapping the base word forms to inflected word forms, to avoid errors in inflection.

In some examples, the Morphology Processor115is configured to mark the base word forms by the part of speech (pos) from which they come so that, for example, the noun date (day of the month or sweet edible fruit) is not confused with the verb date (assign a date to or meet a with a lover). In some examples, the correct part of speech may be taken from an input realization element. For example, love may be marked pos=verb. In this example, the Morphology Processor115is informed by the input realization element as to what base form should be used.

In some examples, the Morphology Processor115is configured to receive a base word form and to access a lexicon to determine if it specifies the inflected form. If it does not, default morphology rules are applied as shown above. For example, in the case of arise the default output would be arised. However, the lexicon will override this default setting and specify arose.

In some examples embodiments, the Morphophonology Processor116is configured to access an input, and apply morphophonology rules to generate natural language. In some examples, the Morphophonology Processor116may be configured to determine a prefix or indefinite article such as the English words “a” or “an.” In some examples, the prefixes stored in memory specify that “an” should be used before any word that starts with the letters “um” (e.g., “an umbrella”) but “a” for any word starting with “uni” (e.g., “a university”). For example, when accessing or receiving an input at Morphophonology Processor116including the word components of the sentence “john attends an university”, Morphophonology Processor116is configured to output “a” instead of “an.”

The Orthography Processor117is configured, in some example embodiments, to access an input, and apply orthography rules to generate natural language. For example, Orthography Processor117may be configured to receive an input to generate an orthographically processed output (e.g., formList([“apple”, “banana”, “pear”]) would return either “apple, banana, and pear” or “apple, banana and pear”, depending on a given Oxford Comma Style parameter). In some examples, the orthographically processed natural language is generated by capitalizing individual words or sentences. For example, the Orthography Processor117may be configured, in some examples, to input “john loves mangoes” and to output “John loves mangoes.” In some example embodiments, capitalization of an input data structure can be controlled in several ways including leaving the capitalization as is, capitalizing the first letter of the first word in a sentence or clause, capitalizing the first letter of every word in a sentence or clause, capitalizing all words in a clause or sentence in upper case, or setting all words in a clause or sentence in lower case.

The Mark-Up Processor118is configured, in some example embodiments, to access an input, and apply mark-up rules to generate natural language. For example, mark-up processor may be configured to generate a marked-up realization element by converting internal markups into a mark-up format or plurality of formats that can be understood by a plurality of natural language text presentation systems by performing various mark-up services (e.g., if the output is to be configured as HTML then input boldFont(“apple”) would return <B>apple</B>). In some examples, mark-up services can include outputting bold font or red text. In some examples, the natural language text presentation systems can include HTML, Latex, or Word RTF.

In some examples, Scripted File Processor155may be configured to call various NLG services or document orchestration modules discussed above, which might range from realizing a complete document plan to just getting the plural form of a word. In some examples, Scripted File Processor155may also be configured to receive and/or access a scripted input language file, such as Scripted Input File150, containing one or more document orchestration requests (i.e. calls to NLG services that range from realizing a complete document plan to just getting the plural form of a word). Scripted File Processor155may further parse Scripted Input File150to determine the contents of the one or more document orchestration requests. In some examples, the document orchestration requests may comprise an identification of a document orchestration module of one or more document orchestration requests and formatted instructions for execution by the document orchestration module. Further examples of formatted instructions for execution by a document orchestration module, are discussed in more detail in relation toFIG. 3.

In some examples, Document Orchestrator110may comprise communication channels between the processors and orchestration modules such as Communication Channel130and Communication Channel140. In some examples, Communication Channel130may be configured to invoke document orchestration modules and pass the document orchestration module the formatted instructions from Scripted File Processor155. In some examples, Communication Channel140may be configured to receive a natural language output from a document orchestration module and pass the natural language output to Scripted File Processor155or Output Text Processor160. Alternatively or additionally, an output of a document orchestration module may be text (whereas in other examples, the output of a document orchestration module may be passed to any other document orchestration module in Document Orchestrator110).

In one particular example, Document Orchestrator110, may be embodied using a template engine, such as an Apache Velocity template engine by utilizing HTML pages as velocity templates embodied in a scripted input language file.

For example, the following instructions contained in a scripted input language file will invoke a morphology module:

In this above example, pluraliseNoun invokes a morphology module and returns a singular or plural form, depending on the number, of “$no_accounts”.

Another example embodiment includes:

In this example, the scripted input language file includes three orchestration requests. The requests are configured to microplan and realize three messages:

FIG. 2is an example block diagram of an example computing device for practicing embodiments of an example Document Orchestrator110. In particular,FIG. 2shows a Computer System200that may be utilized to implement a Natural Language Generation Environment100having a Natural Language Generation Service101. The Natural Language Generation Service101having a Scripted Input File150and a Content/Data Store120. The Natural Language Generation Service101includes, in some examples, a Document Orchestrator110. The Document Orchestrator including a Scripted File Processor155, a Content Query Processor111, a Document Plan Processor112, a Microplanner Processor113, a Syntax Processor114, a Morphology Processor115, a Morphophonology Processor116, an Orthography Processor117, and a Mark-Up Processor118, Output Text Processor160, a Communication Channel130, and a Communication Channel140.

One or more general purpose or special purpose computing systems/devices may be used to implement the Natural Language Generation Service101. In addition, the Computer System200may comprise one or more distinct computing systems/devices and may span distributed locations. In some example embodiments, the Natural Language Generation Service101may be configured to operate remotely via the network250. In other example embodiments, a pre-processing module or other module that requires heavy computational load may be configured to perform that computational load and thus may be on a remote device or server. For example, Document Orchestrator110may be accessed remotely. Furthermore, each block shown may represent one or more such blocks as appropriate to a specific example embodiment. In some cases, one or more of the blocks may be combined with other blocks. Also, the Natural Language Generation Service101may be implemented in software, hardware, firmware, or in some combination to achieve the capabilities described herein.

In the example embodiment shown, Computer System200comprises a computer memory, such as Memory201, a Display202, one or more processors, such as Processor203, Input/Output devices204(e.g., keyboard, mouse, CRT or LCD display, touch screen, gesture sensing device and/or the like), Other Computer-Readable Media205, and Communications Interface206. The Processor203may, for example, be embodied as various means including one or more microprocessors with accompanying digital signal processor(s), one or more processor(s) without an accompanying digital signal processor, one or more coprocessors, one or more multi-core processors, one or more controllers, processing circuitry, one or more computers, various other processing elements including integrated circuits such as, for example, an application-specific integrated circuit (ASIC) or field-programmable gate array (FPGA), or some combination thereof. Accordingly, although illustrated inFIG. 2as a single processor, in some embodiments the Processor203comprises a plurality of processors. The plurality of processors may be in operative communication with each other and may be collectively configured to perform one or more functionalities of the natural language document orchestrator as described herein.

The Natural Language Generation Service101is shown residing in Memory201. The Memory201may comprise, for example, transitory and/or non-transitory memory, such as volatile memory, non-volatile memory, or some combination thereof. Although illustrated inFIG. 2as a single memory, the Memory201may comprise a plurality of memories. The plurality of memories may be embodied on a single computing device or may be distributed across a plurality of computing devices collectively configured to function as the natural language generation service. In various example embodiments, the Memory201may comprise, for example, a hard disk, random access memory, cache memory, flash memory, a compact disc read only memory (CD-ROM), digital versatile disc read only memory (DVD-ROM), an optical disc, circuitry configured to store information, or some combination thereof.

In other embodiments, some portion of the contents, some or all of the components of the Natural Language Generation Service101may be stored on and/or transmitted over the Other Computer-Readable Media105. The components of the Natural Language Generation Service101preferably execute on one or more Processors203and are configured to enable operation of a natural language document orchestrator, such as Document Orchestrator110, as described herein.

Alternatively or additionally, other code or such as Other Programs230(e.g., an administrative interface, a Web server, and the like) and potentially other data repositories, also reside in the Memory201, and preferably execute on one or more Processors203. Of note, one or more of the components inFIG. 2may not be present in any specific implementation. For example, some embodiments may not provide Other Computer Readable Media205or a Display202.

The Natural Language Generation Service101is further configured to provide functions such as those described with reference toFIG. 1. The Natural Language Generation Service101may interact with the Network250, via the Communications Interface206, with Remote Data Sources252(e.g. remote reference data, remote lexicalization rules, remote aggregation data, remote genre parameters, remote orchestration requests, remote formatted instructions and/or the like), Third-Party Content254and/or Client Devices256. The Network250may be any combination of media (e.g., twisted pair, coaxial, fiber optic, radio frequency), hardware (e.g., routers, switches, repeaters, transceivers), and protocols (e.g., TCP/IP, UDP, Ethernet, Wi-Fi, WiMAX, Bluetooth) that facilitate communication between remotely situated humans and/or devices. In some instances, the Network250may take the form of the internet or may be embodied by a cellular network such as an LTE based network. In this regard, the Communications Interface206may be capable of operating with one or more air interface standards, communication protocols, modulation types, access types, and/or the like. The Client Devices256may include desktop computing systems, notebook computers, mobile phones, smart phones, personal digital assistants, tablets and/or the like.

In an example embodiment, components/modules of the Natural Language Generation Service101are implemented using standard programming techniques. For example, the Natural Language Generation Service101may be implemented as a “native” executable running on the Processor203, along with one or more static or dynamic libraries. In other embodiments, the Natural Language Generation Service101may be implemented as instructions processed by a virtual machine that executes as one of the Other Programs230. In general, a range of programming languages known in the art may be employed for implementing such example embodiments, including representative implementations of various programming language paradigms, including but not limited to, object-oriented (e.g., Java, C++, C#, Visual Basic.NET, Smalltalk, and the like), functional (e.g., ML, Lisp, Scheme, and the like), procedural (e.g., C, Pascal, Ada, Modula, and the like), scripting (e.g., Perl, Ruby, Python, JavaScript, VBScript, and the like), and declarative (e.g., SQL, Prolog, and the like).

In addition, programming interfaces to the data stored as part of the Natural Language Generation System101, such as by using one or more application programming interfaces can be made available by mechanisms such as through application programming interfaces (API) (e.g. C, C++, C#, and Java); libraries for accessing files, databases, or other data repositories; through scripting languages such as XML; or through Web servers, FTP servers, or other types of servers providing access to stored data. Alternatively or additionally, the Scripted Input File150, and/or Content/Data Store120may be local data stores but may also be configured to access data from the Remote Data Sources252.

Furthermore, in some embodiments, some or all of the components of the Natural Language Generation Service101may be implemented or provided in other manners, such as at least partially in firmware and/or hardware, including, but not limited to one or more ASICs, standard integrated circuits, controllers executing appropriate instructions, and including microcontrollers and/or embedded controllers, FPGAs, complex programmable logic devices (“CPLDs”), and the like. Some or all of the system components and/or data structures may also be stored as contents (e.g., as executable or other machine-readable software instructions or structured data) on a computer-readable medium so as to enable or configure the computer-readable medium and/or one or more associated computing systems or devices to execute or otherwise use or provide the contents to perform at least some of the described techniques. Some or all of the system components and data structures may also be stored as data signals (e.g., by being encoded as part of a carrier wave or included as part of an analog or digital propagated signal) on a variety of computer-readable transmission mediums, which are then transmitted, including across wireless-based and wired/cable-based mediums, and may take a variety of forms (e.g., as part of a single or multiplexed analog signal, or as multiple discrete digital packets or frames). Such computer program products may also take other forms in other embodiments. Accordingly, embodiments of this disclosure may be practiced with other computer system configurations.

FIGS. 3-11illustrate example flowcharts of the operations performed by an apparatus, such as Computer System200ofFIG. 2, in accordance with example embodiments of the present invention. It will be understood that each block of the flowcharts, and combinations of blocks in the flowcharts, may be implemented by various means, such as hardware, firmware, one or more processors, circuitry and/or other devices associated with execution of software including one or more computer program instructions. For example, one or more of the procedures described above may be embodied by computer program instructions. In this regard, the computer program instructions which embody the procedures described above may be stored by a Memory201of an apparatus employing an embodiment of the present invention and executed by Processor203in the apparatus. As will be appreciated, any such computer program instructions may be loaded onto a computer or other programmable apparatus (e.g., hardware) to produce a machine, such that the resulting computer or other programmable apparatus provides for implementation of the functions specified in the flowcharts' block(s). These computer program instructions may also be stored in a non-transitory computer-readable storage memory that may direct a computer or other programmable apparatus to function in a particular manner, such that the instructions stored in the computer-readable storage memory produce an article of manufacture, the execution of which implements the function specified in the flowcharts' block(s). The computer program instructions may also be loaded onto a computer or other programmable apparatus to cause a series of operations to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide operations for implementing the functions specified in the flowcharts' block(s). As such, the operations ofFIGS. 3-11, when executed, convert a computer or processing circuitry into a particular machine configured to perform an example embodiment of the present invention. Accordingly, the operations ofFIGS. 3-11define an algorithm for configuring a computer or processor, to perform an example embodiment. In some cases, a general purpose computer may be provided with an instance of the processor which performs the algorithm ofFIGS. 3-11to transform the general purpose computer into a particular machine configured to perform an example embodiment.

In some example embodiments, certain ones of the operations herein may be modified or further amplified as described below. Moreover, in some embodiments additional optional operations may also be included. It should be appreciated that each of the modifications, optional additions or amplifications described herein may be included with the operations herein either alone or in combination with any others among the features described herein.

FIG. 3is a flowchart illustrating an example method for generating natural language text at a natural language document orchestrator, such as by Document Orchestrator110, in a natural language generation service, such as Natural Language Generation Service101. At block302, a natural language document orchestrator, such as Document Orchestrator110, accesses a scripted input language file, such as Scripted Input File150, wherein the scripted input language file comprises one or more document orchestration requests. In some embodiments, Document Orchestrator110is configured to receive Scripted Input Language File150from an input device, such as I/O Devices204. In some examples, Scripted Input File150is directly accessed by and/or received at a scripted input language file processor, such as, Scripted File Processor155. Alternatively or additionally, the scripted file could be generated by a user via a user interface, and input in the form of a scripted file to the Document Orchestrator110.

Alternatively or additionally, the system may not require a scripted input file, but may simply receive individual document orchestration requests from a user via a user interface or other input means. In such cases, the output text may be based on the user input or a combination of a series of user inputs.

At block304, Document Orchestrator110is configured to parse the one or more document orchestration requests by a processor, such as Scripted File Processor155, wherein each document orchestration request comprises an identification of a document orchestration module of one or more document orchestration requests and formatted instructions for execution by the document orchestration module. In some examples, a document orchestration request may identify a first orchestration module to invoke and include formatted instructions to further process the output of the first orchestration module into natural language text. For example, Scripted File Processor155may parse Scripted Input File150to determine that the Scripted Input File150contains a document orchestration request. Scripted File Processor155may further determine that the document orchestration requests identifies a document orchestration module, such as a document planner module, and formatted instructions to utilize the document planner module. In some examples, the document orchestration request may take the form of an application programming interface call whereas in other examples, the document orchestration request may rely on a velocity template.

In some example embodiments, the formatted instructions may include instructions to initiate a Text Generation Service (TextGenerationService), on a scripted input language file processor, such as Scripted File Processor155, which may be configured once for the runtime of the application, such as a natural language document orchestrator, and is then repeatedly called by any code that needs to realize messages utilizing a natural language document orchestrator, such as Document Orchestrator110. An application of the document orchestrator may want to preserve a state across multiple calls to document orchestrator modules so to preserve a discourse model (e.g., context) across calls. In some examples, context information or information related to the discourse model may be included in a document orchestration call.

At block306, a natural language document orchestrator, such as Document Orchestrator110, is configured to execute the one or more document orchestration requests, such as the document orchestration requests described above. In some examples, Document Orchestrator110may execute only one document orchestration request and output natural language text. In some other examples, there may be one or more document orchestration requests to be executed by Document Orchestrator110before natural language output text may be outputted.

In one example, Document Orchestrator110may execute a document orchestration request including an identification of the document plan processor and formatted instructions to utilize the document plan processor. In some examples, the document plan processor is configured to return an output to the Document Orchestrator Module110, whereas in other examples the document plan processor may output to the Microplanner Processor113.

At block308, a natural language document orchestrator, such as Document Orchestrator110, is configured to invoke the document orchestration module identified in block304. In some examples, Document Orchestrator110invokes the document orchestration module by calling an associated processor over a communication channel, such as Communication Channel130. In some examples, the document orchestration module may be invoked by Scripted File Processor155. For example, Scripted File Processor155may identify the document plan document orchestration module and invoke the associated processor, such as Document Plan Processor112.

At block310, a document orchestrator, such as Document Orchestrator110is configured to pass the document orchestration module the formatted instructions (see e.g.,FIGS. 5-11). In some examples, a scripted input language file processor, such as Scripted File Processor155, may pass the parsed instructions from the Scripted File Processor155to the document orchestration module. In some examples, the Scripted File Processor155may parse the formatted instructions for a document plan module and pass the invoked Document Plan Processor112, the parsed formatted instructions over a communication channel, such as Communication Channel130.

At block312, a document orchestrator, such as Document Orchestrator110is configured to receive a natural language output from the document orchestration module. In some examples, the natural language output may be output from the document orchestration module to a data store, such as Content/Data Store120, for further use by Document Orchestrator110. In some examples, the natural language output may be output from the document orchestration module back to a scripted file processor, such as Scripted File Processor155, one or more other document orchestration modules, and/or an output text processor, such as Output Text Processor160. In some examples, the output may be outputted utilizing a communication channel such as Communication Channel140.

At block314, a document orchestrator, such as Document Orchestrator110is configured to process the natural language output to generate natural language text. In some examples, processing the natural language output to generate the natural language text may comprise completing a natural language generation pipeline. For example, a natural language output document plan from Document Plan Processor112may then be further processed by the remaining document orchestration module processors in a natural language pipeline such as Microplanner Processor113, and the natural language realizer document orchestration modules, such as Syntax Processor114, Morphology Processor115, Morphophonology Processor116, Orthography Processor117, and Mark-Up Processor118.

In another example, a natural language output from Morphology Processor115may then be further processed by the remaining document orchestration module processors in a natural language pipeline such as Morphophonology Processor116, Orthography Processor117, and Mark-Up Processor118.

Alternatively or additionally, in some examples the natural language output from the document orchestration module processor, such as Document Plan Processor, may be returned to the Document Orchestrator for further processing. In some examples, the natural language output of Document Plan Processor112may be returned to Scripted File Processor155by Communication Channel140, prior to invoking further document orchestration requests.

At block316, a document orchestrator, such as Document Orchestrator110is configured to determine that all document orchestration requests of the parsed input language file have executed. In some examples, Scripted File Processor155is configured to determine that all the document orchestration requests have executed. If it is determined that all the document orchestration requests have executed, then the process proceeds to block318. If it is determined that all the document orchestration requests have not been executed, then the process returns to block306.

At block318, a document orchestrator, such as Document Orchestrator110is configured to Output the natural language text via an output text processor, such as Output Text Processor160. In some examples, the Output Text Processor160receives natural language output from Mark-Up Processor118. In some examples, Output Text Processor160receives one or more natural langue output via Communication Channel140from one or more document plan module processors. In some examples the text is output via a user interface, whereas in other examples, the text may be output via a file or other method, such as electronic mail, voice communication, or the like.

FIG. 4is a flowchart illustrating an example method for invoking a content query document orchestration module, such as Content Query Processor111, in a natural language document orchestrator, such as Document Orchestrator110. In block402, Document Orchestrator110is configured to start a content query processor such as Content Query Processor111.

In some examples, Document Orchestrator110starts the content query module by invoking the content query processor and passing the processor the formatted instructions. In some examples, Scripted File Processor155is configured to start Content Query Processor111through Communication Channel130, by invoking Content Query Processor111and passing associated formatted instructions to Content Query Processor111.

At block404, the content query document orchestration module, such as Content Query Processor111is configured to create a new instance of a content query, based on the formatted instructions.

At block406, the content query document orchestration module, such as Content Query Processor111is configured to query the content store and return messages. In some examples, Content Query Processor111is configured to utilize the formatted instructions to at least perform one or more of selecting a message type, gathering one or more message instances, and/or sorting one or more messages. In some examples, the Content Query Processor111is configured to query or otherwise access the content/data store120.

At block408, the content query document orchestration module, such as Content Query Processor111is configured to select a message type comprising one or more argument classes and one or more child classes of the content query, wherein the one or more argument classes and the one or more child classes identify the content to be queried.

In some examples, multiple argument classes may be queried to search for messages about multiple subjects. For example, messages about both wind and rain may be queried together to include messages which related to both classes or subjects.

At block410, the content query document orchestration module, such as Content Query Processor111, is configured to gather one or more message instances by querying a content store, such as Content/Data Store120, by argument class and child classes, selected in block408, wherein the one or more message instances comprise unordered portions of a natural language text representing the queried content. In some examples, the Content Query Processor111utilizes the formatted instructions to execute the content query.

For further example, to get all messages of certain type, such as related to wind, i.e. WindMessage, the formatted instructions may include the following commands to query Content/Data Store120:

At block412, the content query document orchestration module, such as Content Query Processor111is configured to sort the one or messages gathered at block410, by at least one of content sort properties and comparators. In some examples, the Content Query Processor111utilizes the formatted instructions to sort the gather messages. The formatted instructions may take a variety of forms with various resulting functionality in the sorting of the messages.

In some examples, the formatted instructions may include instructions to sort gathered messages relating to a particular message, such as WindMessage, including properties such as “name” and “importance” among others.

In some further examples, Content Query Processor111may be further configured to limit a number of items returned from a content query. For example, a common use case for constructing Content Store queries is to limit the number of messages returned by a query, such as limiting to the top five most relevant messages in the content/data store.

In some example emblements, a content query document orchestration module, such as Content Query Processor111may also be configured to receive formatted instructions to create and store message instances in a content store such as Content/Data Store120. In some example embodiments, the formatted instructions include instructions to initiate a ContentStore instance, add relevant message classes to the ContentStore, and create a message instance from JSON (JavaScript Object Notation) instructions.

At block414, the content query document orchestration module, such as Content Query Processor111is configured to output the sorted messages. In some examples, Content Query Processor111is configured to output the sorted messages to a next step in a natural language generation pipeline a document plan orchestration module such as Microplanner Processor113. In some examples, Content Query Processor111is configured to output the sorted messages to an output text processor such as Output Text Processor160via Communication Channel140. In some examples, Content Query Processor111is configured to output the sorted messages to Scripted File Processor155, via Communication Channel140, for further processing by Document Orchestrator110.

FIG. 5is a flowchart illustrating an example method for invoking a document plan document orchestration module, such as Document Plan Processor112, in a natural language document orchestrator, such as Document Orchestrator110. At block502, Document Orchestrator110is configured to start a document plan processor, such as Document Plan Processor112. In some examples, Document Plan Processor112, is configured to input one or more messages and/or the formatted instructions to arrange the messages. In some examples, Document Orchestrator110starts the document plan module by invoking the document plan processor and passing the processor one or more messages and/or formatted instructions. In some examples, Scripted File Processor155is configured to start Document Plan Processor112through Communication Channel130, by invoking Document Plan Processor112and passing associated one or more messages and/or formatted instructions to Document Plan Processor112.

In some examples, Document Plan Processor112may start by creating a “DocPlanGenerator” instance call utilizing formatted instructions such as:

At block504, the document plan module, such as Document Plan Processor112is configured to instantiate a document plan with one or more messages. In some examples, this includes the one or more messages inputted at block502. In some examples, messages may include one or more messages generated by the Content Query Processor111and/or stored in the Content/Data Store120, based on the formatted instructions. In some examples, the one or more messages may be sorted messages from a content query document orchestration module, such as Content Query Processor111.

In some examples, the Document Plan Processor112may include formatted instructions to create a document plan. For example:

DocPlan result=dpg.document(dpg.paragraph(“this will be a canned text sentence”, ms g1));

At block506, the document plan document orchestration module, such as Document Plan Processor112, is configured to determine if textual output was requested in the formatted instructions. For example, the formatted instructions may include instructions such as “target=text”. If the output text is requested, the example method proceeds to block508. If output text was not requested the example method proceeds to block510.

At block508, the document plan document orchestration module, such as Document Plan Processor112, is configured to output the document plan to a microplanner module. In some examples, Document Plan Processor112is configured to further complete a natural language generation pipeline by outputting the document plan to a microplanner document orchestration module such as Microplanner Processor112. As the remaining modules of the pipeline complete, a textual output will be generated.

At block510, the document plan document orchestration module, such as Document Plan Processor112, is configured to return the document plan to the document orchestrator. In some examples, Document Plan Processor112is configured to output the document plan to an output text processor such as Output Text Processor160via Communication Channel140. In some examples, Document Plan Processor112is configured to output the document plan to Scripted File Processor155, via Communication Channel140, for further processing by Document Orchestrator110.

FIG. 6is a flowchart illustrating an example method for invoking a microplanner document orchestration module, such as Microplanner Processor113, in a natural language document orchestrator, such as Document Orchestrator110. In block602, Document Orchestrator110is configured to start a microplanner processor, such as Microplanner Processor113. In some examples, Microplanner Processor113, is configured to input one or more messages and/or formatted instructions to create one or more texts or realization elements from one or more messages. In some examples, Document Orchestrator110starts the microplanner module by invoking the microplanner processor and passing the processor the formatted instructions. In some examples, Scripted File Processor155is configured to start Microplanner Processor113through Communication Channel130, by invoking Microplanner Processor113and passing associated formatted instructions to Microplanner Processor113.

Alternatively or additionally, in some examples, Microplanner Processor113is invoked by a document plan document orchestration module, such as Document Plan Processor112, as part of a natural language generation pipeline, which starts the microplanner module by invoking the microplanner processor and passing the processor a document plan.

At block604, the microplanner document orchestration module, such as Microplanner Processor113is configured to access an input and apply microplanner rules to generate one or more phrase specifications. In some examples, the input may be a structured document plan outputted from a document plan document orchestration module, such as Document Plan Processor112, or contained in the formatted instructions. In some examples, the input may be one or more messages and/or formatted instructions to create one or more texts or phrase specifications (realization elements) from one or more messages received from Scripted File Processor155or stored in Content/Data Store120.

In some examples, applying microplanner rules to generate one or more phrase specifications may comprise converting at least one message in the input, such as a document plan or messages, into a phrase specification. Applying microplanner rules to generate one or more phrase specifications may further include applying one or more lexicalization rules, aggregation rules, or referring expression rules, and/or determining aspects of ordering.

In some examples, the input, such as a document plan, may contain one or more leaf nodes that contain messages. Initially and in some example embodiments, the text specification may include a tree structure that matches or is otherwise structured in the same or similar manner as a document plan tree. Each leaf node of a text specification may include a phrase specification with one or more empty elements. The Microplanner Processor113may be configured to populate those element values by applying genre parameters, lexicalization rules, reference rules, aggregation rules and the like.

In some example embodiments, the Microplanner Processor113may be configured to input a series of genre parameters that are representative of genre conventions. Genre conventions are rules about the use of language which apply throughout texts in that particular genre, and may be accessible by any of the Document Orchestrator modules described herein. In some examples, however, the rules may be overridden by a user, by lexicalization rules and/or the like. The genre conventions are captured by the genre parameters that specify default behavior for the linguistic realizer so that these aspects of language use do not have to continually re-specified by a user. Examples of genre parameters include, but are not limited to, the particular tense that should be used consistently throughout the text to be generated; a convention on the use of pronouns in the text to be generated; and/or a convention as to whether or not abbreviated names are to be used in the text to be generated. Alternatively or additionally, other elements of the phrase specification may be set by the one or more genre conventions.

At block608, the microplanner document orchestration module, such as Microplanner Processor113, is configured to determine if textual output was requested in the formatted instructions. For example, the formatted instructions may include instructions such as “target=text.” If the output text is requested, the example method proceeds to block610. If output text was not requested the example method proceeds to block612.

At block610, the microplanner document orchestration module, such as Microplanner Processor113, is configured to output the input as a microplanned output. In some examples, the microplanned output may be an output phrase specification, such as a realization element. In some examples, the output of Microplanner Processor113, may include the phrase specification as a realization element to a next step in a natural language generation pipeline, such as a syntax document orchestration module such as Syntax Processor114. As the remaining modules of the pipeline complete, a textual output will be generated.

At block612, the microplanner document orchestration module, such as Microplanner Processor113, is configured to return the microplanned output to the document orchestrator. In some examples, Microplanner Processor113is configured to return the microplanned output as the orchestrated input. In some examples, Microplanner Processor113is configured to output the microplanned output to an output text processor such as Output Text Processor160via Communication Channel140. The output of Output Text Processor160being, in this example, microplanned natural language text. In some examples, Microplanner Processor113is configured to output the microplanned output to Scripted File Processor155, via Communication Channel140, for further processing by Document Orchestrator110.

FIG. 7is a flowchart illustrating an example method for invoking a syntax document orchestration module, such as Syntax Processor114, in a natural language document orchestrator, such as Document Orchestrator110. In block702, Document Orchestrator110is configured to start a syntax processor, such as Syntax Processor114. In some examples, Document Orchestrator110starts the syntax module by invoking the syntax processor and passing the processor the formatted instructions. In some examples, Scripted File Processor155is configured to start Syntax Processor114through Communication Channel130, by invoking Syntax Processor114and passing associated formatted instructions to Syntax Processor114.

Alternatively or additionally, in some examples, Syntax Processor114is invoked by a microplanner document orchestration module, such as Microplanner Processor113, as part of a natural language generation pipeline, which starts the syntax module by invoking Syntax Processor114and passing the processor a microplanned output, such as a realization element.

At block704, the syntax document orchestration module, such as Syntax Processor114is configured to access an input, and apply syntactic rules to generate natural language.

In some examples, the input may be one or more realization elements outputted from a microplanner document orchestration module, such as Microplanner Processor113. In some examples, the input may be realization elements contained in the formatted instructions received from Scripted File Processor155. In some examples, the input may alternatively be instructions to perform a syntactic function, such as form a verb group.

In some examples, applying syntactic rules to generate natural language includes propagating features in the input. In some examples, applying syntactic rules to generate natural language may further include adding closed class function words and morphological inflections by utilizing rules from the formatted instructions to determine closed class function words and morphological inflections to add to the base words and phrases in the input.

In some examples, applying syntactic rules to generate natural language includes other syntactic functions such as forming a verb group. For example, Syntax Processor114may be configured to perform verb group formation (e.g., VerbGroup(“eat”, PAST) returns “ate” and VerbGroup (“eat”, FUTURE, NEGATED) returns “will not eat”).

At block706, the syntax document orchestration module, such as Syntax Processor114, is configured to determine if textual output was requested in the formatted instructions. For example, the formatted instructions may include instructions such as target=text. If the output text is requested, the example method proceeds to block708. If output text was not requested the example method proceeds to block710.

At block708, the syntax document orchestration module, such as Syntax Processor114, is configured output the syntactic output. In some examples, the syntactic output comprises an updated or syntactically processed input. In some examples, the syntactic output comprises text. In some examples, Syntax Processor114is configured to output the syntactic output to a next step in a natural language generation pipeline, such as a morphology document orchestration module, such as Morphology Processor115.

At block710, syntax document orchestration module, such as Syntax Processor114, is configured to return the syntactic output to the document orchestrator. In some examples, Syntax Processor114is configured to output the syntactic output to an output text processor such as Output Text Processor160via Communication Channel140. In some examples, Syntax Processor114is configured to output the syntactic output to Scripted File Processor155, via Communication Channel140, for further processing by Document Orchestrator110.

FIG. 8is a flowchart illustrating an example method for invoking a morphology document orchestration module, such as Morphology Processor115, in a natural language document orchestrator, such as Document Orchestrator110. In block802, Document Orchestrator110is configured to start a morphology processor, such as Morphology Processor115. In some examples, Document Orchestrator110starts the morphology module by invoking the morphology processor and passing the processor the formatted instructions. In some examples, Scripted File Processor155is configured to start Morphology Processor115through Communication Channel130, by invoking Morphology Processor115and passing associated formatted instructions to Morphology Processor115.

Alternatively or additionally and in some examples, Morphology Processor115is invoked by a syntax document orchestration module, such as Syntax Processor114, as part of a natural language generation pipeline, which starts the morphology module by invoking the Morphology Processor115and passing the processor a syntactic output, such as a syntactically processed realization element.

At block804, the morphology document orchestration module, such as Morphology Processor115is configured to access an input, and apply morphology rules to generate natural language. In some examples, applying morphology rules to generate natural language may include utilizing a base form of the word as a parameter and returning the plural form according to the formatted instructions and morphology rules (e.g., getPlural (“child”) returns “children”). Another example includes, given an input “John, love, mango,” wherein mango includes the plural feature (i.e., mango[number: plural]), the Morphology Processor115is configured to output “John loves mangoes.”

Alternatively or additionally, and in some examples, the input may be one or more realization elements outputted from a syntax document orchestration module, such as Syntax Processor114. In some examples, the input may be realization elements contained in the formatted instructions received from Scripted File Processor155.

In some examples, applying morphology rules to generate natural language may include substituting a base word form in the input with an inflected word from a lexicon by searching the lexicon for the base word form and using the formatted instructions to determine which inflected form from the lexicon to substitute. In some examples, Morphology Processor115may be configured to utilize a lexicon stored in Content/Data Store120.

In some examples, applying morphology rules to generate natural language may include utilizing a base word form for other realization operations, by using the formatted instructions to determine other morphological changes to the input.

At block806, the morphology document orchestration module, such as Morphology Processor115, is configured to determine if textual output was requested in the formatted instructions. For example, the formatted instructions may include instructions such as target=text. If the output text is requested, the example method proceeds to block808. If output text was not requested the example method proceeds to block810.

At block808, the morphology document orchestration module, such as Morphology Processor115, is configured to output a morphological output to a morphophonology module. In some examples, the morphological output comprises updated or morphologically processed input. In some examples, the morphological output comprises text. In some examples, Morphology Processor115is configured to output the morphological output to a next step in a natural language generation pipeline, such as a morphophonology document orchestration module, such as Morphophonology Processor116

At block810, the morphology document orchestration module, such as Morphology Processor115, is configured to return the morphological output to the document orchestrator. In some examples, Morphology Processor115is configured to output the morphological output to an output text processor such as Output Text Processor160via Communication Channel140. In some examples, Syntax Processor114is configured to output the morphological output to Scripted File Processor155, via Communication Channel140, for further processing by Document Orchestrator110.

FIG. 9is a flowchart illustrating an example method for invoking a morphophonology document orchestration module, such as Morphophonology Processor116, in a natural language document orchestrator, such as Document Orchestrator110. In block902, Document Orchestrator110is configured to start a morphophonology processor, such as Morphophonology Processor116. In some examples, Document Orchestrator110starts the morphophonology module by invoking the morphophonology processor and passing the processor the formatted instructions. In some examples, Scripted File Processor155is configured to start Morphophonology Processor116through Communication Channel130, by invoking Morphophonology Processor116and passing associated formatted instructions to Morphophonology Processor116.

Alternatively or additionally, in some examples, Morphophonology Processor116is invoked by a morphology document orchestration module, such as Morphology Processor113, as part of a natural language generation pipeline, which starts the morphophonology module by invoking Morphophonology Processor116and passing the processor a morphological output, such as a morphologically processed realization element.

At block904, the morphophonology document orchestration module, such as Morphophonology Processor116is configured to access an input, and apply morphophonology rules to generate natural language.

In some examples, the input may be realization elements outputted from a morphology document orchestration module, such as Morphology Processor115. In some examples, the input may be realization elements contained in the formatted instructions received from Scripted File Processor155.

In some examples, applying morphophonology rules to generate natural language includes accessing an input including the input “john attends an university”, and outputting “a” instead of “an” according to morphophonological rules.

At block906, the morphophonology document orchestration module, such as Morphophonology Processor116, is configured to determine if textual output was requested in the formatted instructions. For example, the formatted instructions may include instructions such as target=text. If the output text is requested, the example method proceeds to block908. If output text was not requested the example method proceeds to block910.

At block908, the morphophonology document orchestration module, such as Morphophonology Processor116, is configured to output a morphophonological output to an orthography module. In some examples, the morphophonological output comprises updated or morphophonologically processed input. In some examples, the morphophonological output comprises text. In some examples, Morphophonology Processor116is configured to output the morphophonological output to a next step in a natural language generation pipeline, such as an orthography document orchestration module, such as Orthography Processor117.

At block910, the morphophonology document orchestration module, such as Morphophonology Processor116, is configured to return the morphophonological output to the document orchestrator. In some examples, Morphophonology Processor116is configured to output morphophonological output to an output text processor such as Output Text Processor160via Communication Channel140. In some examples, Morphophonology Processor116is configured to output the morphophonological output to Scripted File Processor155, via Communication Channel140, for further processing by Document Orchestrator110.

FIG. 10is a flowchart illustrating an example method for invoking an orthography document orchestration module, such as Orthography Processor117, in a natural language document orchestrator, such as Document Orchestrator110. In block1002, Document Orchestrator110is configured to start an orthography processor, such as Orthography Processor117. In some examples, Document Orchestrator110starts the orthography module by invoking the orthography processor and passing the processor the formatted instructions. In some examples, Scripted File Processor155is configured to start Orthography Processor117through Communication Channel130, by invoking Orthography Processor117and passing associated formatted instructions to Orthography Processor115.

Alternatively or additionally, in some examples, Orthography Processor117is invoked by a morphophonology document orchestration module, such as Morphophonology Processor116, as part of a natural language generation pipeline, which starts the orthography module by invoking the Orthography Processor115and passing the processor a morphophonological output, such as a morphophonologically processed realization element.

At block1004, the orthography document orchestration module, such as Orthography Processor117is configured to access an input, and apply orthography rules to generate natural language. In some examples, accessing an input, and applying orthographic rules to generate natural language comprises utilizing the formatted instructions to update the input by performing at least one or more of the steps described below in relation to blocks1006,1008,1010, and1012.

In some examples, the input may be realization elements outputted from a morphophonology document orchestration module, such as Morphophonology Processor116. In some examples, the input may be realization elements contained in formatted instructions received from Scripted File Processor155.

At block1006, the orthography document orchestration module, such as Orthography Processor117is configured to capitalize individual words from the input, according to the formatted instructions.

At block1008, the orthography document orchestration module, such as Orthography Processor117is configured to format numbers from the input such as applying currency or date formats according to the formatted instructions.

At block1010, the orthography document orchestration module, such as Orthography Processor117is configured to perform punctuation operations on the input, according to the formatted instructions.

At block1012, the orthography document orchestration module, such as Orthography Processor117is configured to place white space characters between words in the input, according to the formatted instructions.

In some examples, the orthography document orchestration module, such as Orthography Processor117is further configured to a particular genre parameter such as an orthography style, such as a western orthography. For example, this orthography style may provide instructions on the proper currency symbol to use, a proper date format, or the proper measurement convention.

At block1014, the orthography document orchestration module, such as Orthography Processor117, is configured to determine if textual output was requested in the formatted instructions. For example, the formatted instructions may include instructions such as target=text. If the output text is requested, the example method proceeds to block1016. If output text was not requested the example method proceeds to block1018.

At block1016, the orthography document orchestration module, such as Orthography Processor117, is configured to output orthographical output to a mark-up module. In some examples, the orthographical output comprises an updated or orthographically processed input. In some examples, the orthographical output comprises text. In some examples, Orthography Processor117is configured to output the orthographical output to a next step in a natural language generation pipeline, such as a mark-up document orchestration module, such as Mark-up Processor118.

At block1018, the orthography document orchestration module, such as Orthography Processor117, is configured to return the orthographical output to the document orchestrator. In some examples, Orthography Processor117is configured to output the orthographical output to an output text processor such as Output Text Processor160via Communication Channel140. In some examples, Orthography Processor117is configured to output the orthographical output to Scripted File Processor155, via Communication Channel140, for further processing by Document Orchestrator110.

FIG. 11is a flowchart illustrating an example method for invoking a mark-up document orchestration module, such as Mark-Up Processor118, in a natural language document orchestrator, such as Document Orchestrator110. In block1102, Document Orchestrator110is configured to start a mark-up processor, such as Mark-Up Processor118. In some examples, Document Orchestrator110starts the mark-up module by invoking the mark-up processor and passing the processor the formatted instructions. In some examples, Scripted File Processor155is configured to start Mark-Up Processor118through Communication Channel130, by invoking Mark-Up Processor118and passing associated formatted instructions to Mark-Up Processor118.

Alternatively or additionally, in some examples, Mark-up Processor118is invoked by an orthography document orchestration module, such as Orthography Processor117, as part of a natural language generation pipeline, which starts the orthography module by invoking the orthography processor and passing the processor an orthographical output, such as a orthographically processed realization element.

At block1104, the mark-up document orchestration module, such as Mark-Up Processor118is configured to access an input, and apply mark-up rules to generate natural language. In some examples, accessing an input, and applying mark-up rules to generate natural language comprises utilizing the formatted instructions to update the input by performing at least one or more of the steps described below.

In some examples, the input may be realization elements outputted from an orthography document orchestration module, such as Orthography Processor117. In some examples, the input may be realization elements contained in formatted instructions received from Scripted File Processor155.

In some examples, applying mark-up rules to generate natural language may include configuring an input “boldFont(“apple”)” to return “<B>apple<B>”, if the output is marked to be output as HTML. In some examples, mark-up services can include outputting bold font or red text among other services.

In some examples, applying mark-up rules to generate natural language may include the methods described further in reference to block1106.

At block1006, the mark-up document orchestration module, such as Mark-Up Processor118is configured to convert internal markups found in the input into a mark-up format or plurality of formats that can be understood by a plurality of natural language text presentation systems.

At block1108, the mark-up document orchestration module, such as Mark-Up Processor118, is configured to output a marked-up output. In some examples, the marked-up output comprises updated or marked-up input. In some examples, the marked-up output comprises text. In some examples, Mark-Up Processor118is configured to output the marked-up output to a next step in a natural language generation pipeline, such as Output Text Processor160, to produce natural language text. In some examples, Mark-Up Processor118is configured to output the marked-up output to Scripted File Processor155, via Communication Channel140, for further processing by Document Orchestrator110.