The present disclosure is directed generally to information technology and, more particularly, to the use of semantic information for processing expressions found in documents, images, etc.
Most modern organizations store information in electronic document repositories. This information is constantly changing and one of the hardest tasks in document management is maintaining the global consistency of information across the entire document repository. One way to make sure that all information is consistent is to propagate changes through the entire document repository. However, propagating changes is not an easy task. Consider the following simple paragraph:
Suppose now that Bill becomes divorced and the company would like to update Bill's personal profile. A human would have little trouble rewriting that paragraph because of the semantic models people inherently use to understand words and what they mean in the context in which they are used. However, a computer would have a difficult task with such a paragraph. A search for “Jane Doe” would uncover only one reference, but the paragraph refers to Jane in three of the four sentences and in one sentence to “his wife”. The reference to “his wife” would be understood by a person to be the former Jane Doe, but a computer would not have such an understanding. A broader search for “Jane” would uncover four instances of the use of “Jane.” However, one instance is their daughter. Again, a person would have no trouble understanding that the last use in the second sentence is their daughter Jane, but a computer would not have such an understanding. Also, the search for “Jane” would not uncover the reference to his wife. There is also the issue of changing the verb tense in the first sentence from “is” to “was”. Now imagine this simple problem repeated thousands of times across a data base of thousands of documents.
Existing document management applications may provide display and editing environments for structured documents (such as XML). These are semantic only in the weak sense that all XML documents are semantic—the tags associated with document elements have a meaning apparent to human users.
Editing functionality is typically restricted to the single document under review. Though a document may have dense internal links, there are generally few references to external resources (beyond the occasional read-only HTML-type link).
When an external data source is involved, it is generally read-only, e.g., as in a web page produced from a database query. If the system allows write access to an external repository, it is generally in a very straightforward “spreadsheet-like” way, e.g., editing values in the cells of a table that directly reflects the structure of the underlying data.
The semantic models humans use to understand documents are exceedingly complex. Consequently, maintaining consistency, persistence and coherence of semantic references under editing is a daunting task, particularly with documents that combine narrative or free text with structured information (tables, graphs, etc.). Maintaining consistency is very difficult for even one document, and compounded greatly when the scope expands to the whole document space of an enterprise.
Thus, the need exists for a system and method for anchoring expressions to semantic objects based on an ontology.
According to one embodiment of the present disclosure, a method of creating a bi-directional, semantic coupling, is comprised of linking a surface region in a document to a remotely stored semantic object. The semantic object is associated with the surface region which links to the semantic object. In another embodiment, the linking generates an explicit, persistent link stored locally with the document. The surface region may comprise a point, word, phrase, or location within the local document as well as contiguous and noncontiguous points, words, phrases, or locations within the local document.
According to another embodiment, a type is assigned to the bi-directionally coupled expression. The type may be one of an identity type, attribute type, value type, or function type, among others. The presentation of a function type may be further controlled by user supplied information. The method may be implemented such that either one of the linking and the associating, or both, may be performed either automatically or manually.
Another embodiment of the present disclosure is directed to a method of creating a bi-directional, semantic coupling. The method is comprised of identifying a surface region in a document. A link is locally generated to couple the identified surface region to a remotely stored semantic object. An association is remotely generated to couple the semantic object to the surface region which links to it. A type is assigned to the bi-directional coupled surface region.
Other aspects of the present disclosure are directed to the bi-directionally coupled (also referred to as semantically anchored) expressions themselves, both from a local and a global reference point. An apparatus for performing the disclosed methods and for constructing the semantically anchored expressions is also disclosed.
Disclosed herein is a method and apparatus for the recording and maintenance of semantic elements in electronically-held information objects. Specific techniques for grounding semantic objects based on an ontology, such that inheritance and other relations between concepts are preserved in persistent storage, are also disclosed. The disclosed method and apparatus provide semantic document authors with a means to anchor concept references to specific, persistent semantic objects, thereby providing the system with access to all properties of the underlying data model of the semantic objects being referenced, while also specifying the type and scope of their relations, as well as behavioral aspects of the visual and editing environment. Those, and other advantages and benefits, will become apparent from the detailed description below.
For the method and apparatus of the present disclosure to be easily practiced and readily understood, the method and apparatus will now be described, for purposes of illustration and not limitation, in connection with the following figures wherein:
The method and apparatus of the present disclosure address the problems set forth above by anchoring surface regions encompassing words, phrases, and other surface expressions to semantic objects based on an ontology. In the example paragraph above, words like “Bill,” “Jane,” and “wife” can be semantically anchored to semantic objects which allow the computer to understand what those words mean, to the extent meaning can be found in either the semantic object or the ontology. By “semantically anchored” we mean that there is a bi-directional coupling of the surface regions which, from the user's perspective, appear as surface expressions, to the semantic object and of the semantic object to the surface region. The expression that appears in the region under Presentation (defined below) may be derived from the underlying semantic object, or may be completely arbitrary and user-defined. The association to the region exists independently of any particular surface expression that appears there. Before we can begin to explain the method and apparatus of the present disclosure, we should introduce a few terms. Note that the introduction of these terms is intended to provide context for the disclosed embodiments and to satisfy the best mode requirement. These terms, when used in the claims, should be broadly interpreted to the extent allowed by the prior art and not limited to the following definitions.
In this disclosure, we will be dealing with Information Objects (IOs). An IO is simply a source of information. An IO may encompasses images, graphical objects, audio files, and structured or semi-structured material, as well as text (with or without mark-up). An IO might be an entire document. An IO might be an “invisible” point, area of white space, etc. that is nevertheless able to be pointed to and described. A “point IO” is an information source—it has information about a location in a document. If the document is actually an audio file, an IO might be the part of the audio file where a particular word is spoken, or the “dead air” between words. One cannot enumerate or even unambiguously identify all potential IOs in a document because the IOs can be composed. For example, “John K Smith” could be an IO, but so could “John” and “K” and “Smith”, and the whitespace between the words, etc. There is a very large (though finite, due to storage granularity) number of potential IOs in a document.
A surface region (or surface form) is the region of a document under the scope of a Semantically Anchored Expression (SAEs are defined below). The surface region may comprise a point, word, phrase, or location within the local document as well as contiguous and noncontiguous or even overlapping points, words, phrases, or locations within the local document. See
A surface expression is the appearance of the surface region associated with an SAE at the time of presentation, i.e., runtime. The surface expression is the visual or behavioral result of a Presentation (Ps are defined below) interpreting an SAE. For example, in the case of Identity and Attribute types of SAEs, the surface expression at runtime will be congruent with the appearance of the surface region at the time SAE was authored, i.e., design time. But the surface expression can be anything because it's the output of a P process. The surface expression could be different in different Ps. A company directory might appear as a list of names and extensions—but if the person viewing the document is a new hire, or unknown to the system, the P might additionally put pictures and phone numbers next to the names (and suppress that information for longer term employees).
An ontology is a specification of the structure of concepts in a domain of discourse. It may be convenient to think of an ontology as a model of some type of domain knowledge.
A Semantic Object (SO) is a named, typed, and structured entry in a data repository representing an entity and its associated set of properties (e.g., relations; attributes and values; other constraints and conditions). An SO is pointed to by one or more surface regions. The generation of the links that couple the surface region to the SOs is discussed in greater detail below. The properties of the SOs are determined to some extent by the ontology.
SOs have unique “types” that are apparent to or discoverable by the system. Ultimately, the lowest-level constituents are expressible as “primitive” types that can be processed by the system in standard ways (e.g., strings, integers, doubles).
An SO may have certain required attributes and possibly required values (i.e., specified, non-empty values), which represent the definitional (“analytic”) properties and relations of the SO, and an arbitrary number of optional or additional attributes and values (A-Vs), representing its contingent (“synthetic”) properties and relations.
For example, traditionally, the notion “human” includes, by definition, the property “mortal” and the attribute “age,” even if the value of age is not known in the case of a particular human. However, the property “married” is not required for the SO to be “semantically complete.” In the case of constructed knowledge representations, we are free to require arbitrary A-Vs in the SOs. For example, we may require that any SO in our data repository representing an employee must contain valid values for the attributes “Name” and “Social Security Number.”
SOs may have associated version numbers. When an SO is updated, the system may increment the version number, in accordance with standard industry practice and algorithms well known to practitioners of the art, such that previous versions remain accessible. The information associated with an SO may be stored in distributed data structures. An SO's version number may be incremented, for example, whenever any constituent component (or its relationship to other components) is changed.
An SO that is self-complete and cannot be decomposed into other SOs may be referred to as a primitive SO. A Complex Semantic Object (CSO) is an SO that depends on or consists of other SOs for its definition. A relatively straightforward example is a collective entity. For example, “The Gang of Four,” might be represented by an SO that has an attribute “Composed-of” with “value” given by a set of pointers to the four SOs representing the individual members of the Gang of Four.
A more complicated example is an ontologically complex concept, such as a “Sales Event.” This might be represented by an SO composed of one or more “Sales Activities,” which, in turn, are composed of one or more “Sales Actions.” Each of the (nested) substructures may be represented as distinct SOs in the system; each of these SOs may be composed of or point to yet other SOs (such as the SOs representing the location of the event, the individuals who participated, etc.).
A property of an SO may be any of the valid structures of an SO, including a system specific global unique identifier. As a practical matter, properties of an SO may serve as a cover term for any of the attributes, values, or relations of the SO, along with the SO's identity.
A Presentation (P) is a software module expressing a set of specifications of the format and other conditions necessary to render an SO for viewing by a user, including, for each presentation type, a list of the attributes and values (properties) that are required and how the information associated with the entities, attributes, and values is to be structured or combined with other information for display. A P is capable of rendering text, images, and other media types as required. Additionally, it contains a set of modules for expressing the content of SAEs. Minimally, a P would be capable of automatically generating data repository queries for Value-type SAEs, using information stored in the SAE or in data repository meta-data (e.g., the “key” property of a given SO). A P could also contain a set of modules for processing SAEs with named functional types.
With those terms defined, we can now turn to
The user has identified the surface region from just before the “R” to just after the “N” in “Raymond Mussman” as IO-3 and coupled it via link 18 to SO4 in the repository 20. SO4 may be of semantic type “PersonName.” The discontinuous surface region “stell” . . . “an!” is IO-6 that is coupled via link 20 to SO4. The IO-6 may have a function-type (“Expletive”) with supplementary data “Verb=anstellen.” See
Finally, the surface regions that encompass “Gordon Yazzie” IO-4 and “Yazzie” IO-5 are coupled via links 22, 24, respectively, with SO2 which is an SO of the type PersonName. IO-4 is a Value type and IO-5 is an Attribute-type with the property “LastName=LAST.” See
The links 12, 14, 18, 20, 22, and 24 provide a coupling between their respective surface regions and the SOs to which they are coupled. The semantic object repository 16 may contain, although it may be contained elsewhere, an inverted index 26. The inverted index 26 is basically a table for providing an association between each SO and each surface region which points to or is coupled with that SO. In that manner, a coupling is created from the SOs back to each surface region. This process of bi-directionally coupling a surface region and an SO is referred to as creating a semantically anchored expression.
Upon encountering a functional type SAE and verifying that the module required for processing it is present, the P would invoke the module to render the SAE. The function invocation requires the region to be rendered, the SO(s) referenced by the SAE (or retrieved as a result of query processing), and possibly further refining parameters from the SAE properties or user input. Because CSOs contain other SOs, this is a recursive process. For example,
From the foregoing, we can conclude the following about semantically anchored expressions (SAEs) in this embodiment. SAEs are expressions created by users or automatically and displayed through Ps. The appearance and behavior of SAEs under editing reflect the linked SO(s) in a semantically coherent manner, according to the relation expressed by the link(s), and constrained by the context provided by the P. (Note: appearance includes the “null” case where the SAE has no expression, visual or otherwise, and editing behavior includes the case where user modifications are prohibited.)
SAEs are coupled to one or more SOs by a persistent, explicit link stored locally with the local document. These links exist whether or not the document 10 in
SAEs are semantic—the SO types, including their attributes and relations, are ultimately derived from an ontology. Anchoring ensures semantic identity, and the system ensures consistency of reference across the entire document collection. One SAE is referentially identical to another SAE if both SAEs are linked to all and only the same SOs. One SAE is referentially similar to another SAE if both SAEs are linked to at least one identical SO. An SAE has the following (minimal) structure:
a surface region (word, phrase, point, etc.)—as it appears in the IO or document.
a link to one or more SOs (perhaps including the SO's version).
a type (e.g., one of the set {Identity, Attribute, Value}, or an arbitrary Functional type whose behavior is determined in large part by associated Ps). An Identity type SAE refers to (stands for) the entire SO. Conceptually, it is the SO in the context of a given document and P. An Attribute type SAE expresses an indirect relation to some aspect of an SO (e.g., when the reference is to the attribute itself rather than to its value), while a Value type SAE directly expresses some part of an SO (usually through generation of a surface form). A functional type SAE performs custom processing as defined by a P.
an association to enable all SAEs that link to an SO to be identified.
In general, the surface form, link, and type will be stored locally with the IO or document. The association and the SOs will generally be stored remotely.
When expressions are anchored semantically, changes to one part of a document (or to the underlying data repository) may propagate throughout the document collection in ways that are unexpected and may seem “miraculous”.
Some existing systems accommodate persistent links to resources (usually within the document, but occasionally from external sources). Changing the resource updates all the links (e.g., Word's mail merge, document fields, or OLE objects). However, bi-directional semantic couplings enable more powerful and surprising operations. Bi-directional semantic couplings enable a highly flexible indirection—typed links can refer to component parts or specific interpretations of underlying data objects, allowing the system to judge whether and how certain changes need to be propagated. So a replace or update may propagate to only a subset of the linked expressions, and may change their visual representation or behavior in different ways.
Bi-directional semantic couplings are sensitive to context. Because the referent has a rich underlying data model (based on an ontology), a copy and paste operation into a constrained target context (such as a table) may result in more data appearing in the target than was present at the source—a surprising result, with the extra data coming from the data repository.
Similarly, context sensitivity and indirection allow information from multiple regions to be merged in a way that is semantically consistent and coherent (with reference to an ontology), and such that the structure and organization of the resulting new content reflects constraints imposed by the presentation (P).
Turning now to
The user selects at 110 a region having an IO in the document corresponding to the surface form of the desired SAE. This may be accomplished by highlighting or otherwise selecting a demarcated IO, or by simply placing the cursor or otherwise pointing to a point or location in the document (in the case of SAEs with null surface forms), and indicating by some means (e.g., context menu selection) the intent to create an SAE.
Alternatively, the system may nominate regions for SAEs using grammars, rules, patterns, among others, (generally referred to as Resources) and indicate the regions to the user through some form of user feedback (e.g., green squiggly lines under the surface expression of the IO). The operation would proceed upon indication or confirmation of intent to create an SAE.
Having selected a surface region for an SAE within the document, the user must then select at 120 the type of the semantic object(s) to which the SAE will point. If the SAE is to point to more than one SO, the SO types must be identical or at least compatible. An SO (SO1) is “type-compatible” with another SO (SO2) if (a) the constraints on the attributes of SO1 are completely encompassed by those of SO2, and one of (b) both SOs are of the same semantic type, or (c) SO1 is of a semantic type that is subsumed by that of SO2 in an Ontology or vice versa, or (d) b or c applies to SO1 and a component SO of SO2.
It is possible for the user to wish the target of the SAE to be an SO that does not currently exist in the data repository. For instance, the user may be a salesperson identifying a new customer unknown to the system. If the user has permission to add SOs to the data repository, the system prompts at 130 for this. The user creates the new SO at 140 and, if the user needs to create more than one new SO, a loop from 140 to 130 is traversed until all new SOs have been created.
If the data repository access model does not permit modifications, steps 130 and 140 may not be present in some implementations, in which case the system would proceed directly to 150 to query the data repository for existing matching SOs.
Also and independently, some implementations might select the SO type(s) after querying the data repository, in which case step 120 could follow 130 (or 150 if the data repository is read-only).
Given an SO type (or set of compatible types), the system nominates at 150 a candidate set of SOs from the data repository, and prompts the user to select one or more of the candidate SOs. This set may contain newly created SOs as well as existing data repository entries. In some implementations, if the user created new SOs, the set may be limited to those created in 140.
In the preferred implementation, the application would query the data repository once (perhaps upon initial connection) to determine possible SO types, organize the SOs for ease of display (e.g., into a hierarchical menu), and use Resources to examine the surface expression of the IO (if any), using that information to further narrow down the list of SO types. (For instance, if the user identified the text string “John Smith” as the surface expression of the SAE, and the system identified that string as a person name, the system might suggest the PersonName SO type.)
It is also possible for an implementation to additionally query the user for the SAE type and supplemental properties, then use that information to narrow the field of potential SOs. For instance, inserting a Value SAE that expresses the middle initial of a PersonName might cause the system to promote PersonName SOs with known middle initials over those with unknown middle initials.
After one of the foregoing scenarios is carried out, the system presents the user at 160 with a list of SOs. If the desired set of SOs is not in the repository, it is not possible to create the SAE, so the process stops. Otherwise, the user selects at 170 one or more SOs to associate with the SAE.
At this point, the user has identified the location (and optional surface expression) of the SAE, and the SOs to associate with it. Next, the user specifies at 180 the type and properties of the SAE. The type may be one of the set {Identity, Attribute, Value} or a user-defined functional type (with an arbitrary name). Depending on the logical requirements of the SO and SAE types, the user may also specify properties: a set of arbitrary attributes and values providing additional information required to express the SAE according to a P. For instance, an Attribute or Value type SAE might specify the name of the SO attribute to be expressed.
At this point, the system has all the information it needs to create at 190 the local portion of the SAE, a structured text specification (e.g., in XML) that is stored persistently with the document. This creates the coupling between the surface region and the SO in the data repository. However, the system must also associate at 195 each referenced SO in the data repository back to the surface region. That may be accomplished through a type of inverted index, which must minimally associate with each SO a list of pointers to SAEs within documents (e.g., through XPointer/XPath for XML documents), and the SAEs' type. This information enables efficient implementation of semantic operations such as Replace/Update and Merge.
Turning now to
Through a given P, the system attempts to display or otherwise express at 210 an 10 associated with an SAE. Note that this expression may be non-visual (i.e., behavioral) in some applications. For example, the system may respond with a beep or popup form whenever the user hovers over a region associated with a person SO.
The system next determines at 220 the type of the SAE. If the type is one of {Identity, Attribute}, the surface form of the SAE is displayed at 230. Otherwise, the SAE is either a Value or special Functional type, and the system requires information from the repository to express the SAE. If the SAE is a Functional type as determined at step 240 (i.e., has a name that does not match one of the set {Identity, Attribute, Value}), the system checks at 250 to see whether the P recognizes the type. If the function name is unrecognized by the current P, the system can only make a default interpretation at 260. This is implementation-dependent; options include displaying the surface form of the SAE, displaying an error message or placeholder, ignoring the SAE, etc.
If the SAE is a Value type or a Functional type, the system retrieves at 270 the indicated information from the SO(s) in the data repository. If it is a Value type as determined at 280, the value of the indicated SO attribute is expressed at 290. An example would be the LastName field of a PersonName SO. If it is a Function type, the system invokes the function on the P over the SO(s), using any supplied properties as arguments at 295.
Those of ordinary skill in the art will recognize that numerous alternative embodiments are possible such that there is no criticality to the ordering of most of the steps in
A system 40 is illustrated in
The terms “local” and “remote” may! be defined with reference to
Semantic Replace and Semantic Update
There are a variety of ways to change information in an existing semantic document, but they can be reduced to semantic replace and semantic update. The semantic replace operation consists of switching the link between an SAE and an SO to a different SO. The semantic update operation consists of changing the value of a particular attribute of an SO. Note that if the value is itself an SO, this may effectively result in a semantic replace operation. Let us consider the ways in which these two operations can be invoked.
Semantic replace may be invoked when the user selects an SAE and chooses to replace one of its SOs with another. This may or may not involve a change to the surface form of the SAE. For example, the “John Smith” mentioned in document A may not be the same “John Smith” mentioned in document B. In this case, the user may wish to replace SO[“John Smith”, 01] with SO[“John Smith”, 02] in document B. That change would not result in any changes to the surface expression of the SAE. Additionally, this change may need to be made just once, everywhere in document B, or in a variety of places throughout the document collection. Alternatively, the user could directly query to the SO repository and indicate the desire to replace one SO with another. In either case, the change may need to be propagated, based on user preferences or system defaults, to other SAEs linked to the same source SO in the replace operation.
Semantic update may be invoked when the user selects an SO and changes the value of an attribute. If the attribute has a simple type, it is only necessary to verify that all the SAEs with a value relation to that SO are consistent with the new value. If the attribute is itself a semantic object, the semantic replace operation is invoked on all SAEs with the appropriate attribute or value relation to that SO. A semantic update may also be invoked when the user changes the surface form of an SAE that has a value relation to an SO.
If an SAE has more than one SO and/or the replace operation is targeted for more than one SO, then a more complex semantic set replace operation (discussed below) is required.
For any change to a semantic document repository, the scope of the operation should be defined. A typical scope might be a single SAE only, all referentially identical SAEs in one document, or all referentially identical SAEs in the document repository. The scope may be determined manually, automatically, or in a semi-automatic manner. The scope might also be based on the type of the SAE. For example, if the user is updating the value of a particular attribute in an SO, one might typically expect that all SAEs of matching attribute or value type will automatically be within the scope. The user might also wish to look at SAEs with an identity type to make sure that the surrounding text is consistent with the updated SO. For example, consider a document containing a list of salespeople, including the SAE[John Smith], linked with an identity relation to the SO[John Smith]. If John Smith is promoted, and his job title attribute is changed to Sales Manager, then the user may wish to remove him from this list. Of course, a better way to solve this problem would be to build the list using a P that filters for people with the salesperson job title. In that case, the change would happen automatically at runtime. However, we cannot guarantee that all information objects in semantic documents are constructed in the best possible manner.
In a traditional text replace operation, scope is limited to a single document. Even in this case, the user may be required to examine and approve hundreds of individual changes. This problem is magnified in a semantic document repository, as a single semantic object may be linked to hundreds or thousands of SAEs across many documents. Therefore, it is likely that a fully functional semantic document processing system will have a sophisticated interactive scope selection environment that will enable the user to make high-level decisions about where to apply a change without having to view each SAE individually. This environment might summarize the linked SAEs for a given SO according to a variety of parameters, including: surface form, document type, document age, document directory, SAE type, or any number of customized parameters.
Furthermore, a fully functional semantic document processing system will have some mechanism for permissions and document access control. Most users will not have permission to modify every document in the repository. Therefore, it is important to introduce several additional concepts: semantic object versioning and delayed replacement.
Let us assume that the user wishes to replace person A with person B everywhere in the document repository because person A has left the company, but the user does not have permission to modify all the documents. In this case, instant replacement is limited to a subset of SAEs and the remaining SAEs are marked for delayed replacement. Delayed replacement means that the linking change is delayed until the next time a user with permission to change the document actually opens the document. The pending replace operation is cached somewhere in the system. Until the replace is completed (or rejected), other users may be given a cue that there is a pending replace for that particular information object. Delayed replacement could be applied to any document, not just to those with a read-only status for a given user.
In a semantic update operation, a similar problem with access control arises. This can be handled by semantic object versioning. Any change to a semantic object may (e.g., depending on user settings) result in a new version being created. Typically, an SAE will point to the latest version of a semantic object, but it might temporarily point to an older version until an authorized user approves the update operation. In some cases (e.g., historical published documents) the SAE may permanently point to an older version of the semantic object. Users can create a published version of any individual document at any time that simply freezes the version numbers of all links to semantic objects in the document.
The user selects at 310 an SAE in the document, with the SAE being linked to a first or source SO. The user selects at 320 a second or target SO from the data repository with the goal of replacing the source SO with the target SO according to some scope, which the user may be prompted at 330 to select. The scope is either selected by the user at 335 or determined automatically by the system at 340. Alternatively, the system starts with a default scope that is further refined by the user. Some common scopes include: this SAE only, all SAEs in this document, or all SAEs linked to this SO in the document repository. The scope defines a set R of SAEs eligible for replacement and is further filtered at 350 to include only those SAEs referentially identical to the selected SAE. SAE selection 310, target SO selection 320, and (optional) manual scope selection 335 may be performed in any order. If manual scope selection precedes SAE selection, then SAE selection may not be necessary. SAE selection 310 may be accomplished by choosing the SAE directly or by selecting a region of the document, seeing the SAEs overlapping with that region, and then picking one of those SAEs. The target SO 320 may come from the data repository or it may be created on-the-fly by the user.
At this point, we have a source SO, a target SO, and a set R of SAEs pointing to the source SO. We now iterate at 360, 370 through the set R of SAEs and execute a replace operation 390 which replaces target SO for the source SO for the SAE in issue. The user may be asked to accept or reject each replacement at 380 or this decision may be made automatically by the system. Furthermore, the decision may be manual for some SAEs and automatic for other SAEs based on some features of each individual SAE.
While steps 360, 370 demonstrate an iteration mechanism that removes elements from the set, any iteration mechanism that returns each element of the set exactly once can be used in this phase. The actual replace operation may be executed immediately as it is approved or the intention to replace may be cached and the actual execution may occur in one or more batches either during or after iteration is completed. The replace operation on the initial SAE may be executed immediately (e.g., any time after 310 and 320 but before 360) or the selected SAE may be included in the set R and replaced during the normal iteration sequence. Steps 360, 370 demonstrate an iteration mechanism over individual SAEs. Iteration may also be implemented over one or more groups of SAEs. In this case, the decision to replace 380 may be made either manually or automatically for the group as a whole. For example, the SAEs may be grouped by surface form. The replace function 390 has three arguments: an SAE, a source SO, and a target SO. The replace function changes the SAE link from the source SO to the target SO and updates the SO/SAE association table.
The user begins by selecting at 410 an SO. At 420 the user changes the SO, typically by changing the values of one or more the attributes of that SO or by adding new attributes. The user is prompted at 430 to select a scope. At 435 the user may manually select a scope or the scope may be automatically selected by the system at 440. Alternatively, the system starts with a default scope that is further refined by the user. The scope defines a set R of SAEs linked to the SO that are eligible for update and will typically include those SAEs that have an attribute or value relation with at least one of the changed attributes in the SO. Steps 410, 420, 430, 435, 440 can be completed in many different orders. For example, attribute selection 420 may follow scope selection 430, 435, 440. Scope selection may include SO selection, in which case 410 is no longer required.
At this point, we have an updated SO and a set R of SAE's linked to that SO. We now iterate 460, 470 through the set R of SAEs. At 480 a determination is made whether the SAE is consistent with the updated SO, and, if the SAE is no longer consistent, an update function 490 is executed to update the SAE and make it consistent with the changed SO. An SAE in a value relation with the SO is not consistent if the surface form does not satisfy the constraints of the attribute. The constraints may take a number of forms, such as, but not limited to: exact match to a string value, membership in a set, or numeric value in a certain range. Consistency testing and updating may be automatic in some cases and manual in other cases, depending on the nature of the attributes and its constraints, or user preference. The update function 490 changes the surface form of the SAE in such a way that it satisfies the attribute constraints of the linked SO.
Replace/update operations are potentially recursive, and the surface form reconciliation process must take into account a wide range of possible data types within complex SO structures, as well as display and behavioral constraints specific to presentations. It is therefore conceivable that an SO might be updated in such a way as to preclude consistency with one or more SAEs. In this special case, the system might disable the link with notification, perhaps prompting the user to delete it. One possible implementation would define a common function type for “invalid” or “expired” SAEs, and change the SAE type to this value. Presentations could then interpret these SAEs in specific ways; e.g., ignore them, highlight them, etc. Changing the SAE type locally in the document also implies an update of the data repository (which stores the SAE types in its inverted index). This in turn has implications for various semantic operations (e.g., for propagation of replace/update operations; the system would likely not follow “expired” links).
While steps 460, 470 demonstrate an iteration mechanism that removes elements from the set, any iteration mechanism that returns each element of the set exactly once can be used in this phase. The actual update operation may be executed immediately or the intention to update may be cached and the actual execution may occur in one or more batches either during or after iteration is completed. Steps 460, 470 demonstrate an iteration mechanism over individual SAEs. Iteration may also be implemented over one or more groups of SAEs.
In response to a prompt at 530 to select a scope, the scope of the operation is either selected at 535 by the user or determined automatically at 540 by the system. Alternatively, the system starts with a default scope that is further refined by the user. The scope defines a set R of SAEs eligible for replacement and is further filtered at 550 to include only those SAEs referentially similar to the initial SAE. Source SAE selection 510, target SO selection (second part of 520), and (optional) manual scope selection 535 may be performed in any order. If manual scope selection precedes SAE selection, then SAE selection may not be necessary. SAE selection 510 may be accomplished by choosing the SAE directly or by selecting a region of the document, seeing the SAEs overlapping with that region, and then picking one of those SAEs. The target set T of SOs 520 may come entirely from the data repository or one or more may be created on-the-fly by the user.
At this point, we have a set S of source SOs, a set T of target SOs, and a set R of SAEs pointing to at least one of the source SOs. We now iterate 560, 570 through the set R of SAEs and execute a set replace operation 590 which takes the SAE, the set T, and elements of set S linked to the SAE. The user may be asked at 580 to accept or reject each replacement or this decision may be made automatically by the system. Furthermore, the decision may be manual for some SAEs and automatic for other SAEs based on some features of each individual SAE.
While steps 560, 570 demonstrate an iteration mechanism that removes elements from the set, any iteration mechanism that returns each element of the set exactly once can be used in this phase. The actual set replace operation may be executed immediately as it is approved or the intention to replace may be cached and the actual execution may occur in one or more batches either during or after iteration is completed. The set replace operation on the initial SAE may be executed immediately (e.g., any time after 510 and 520 but before 560) or the initial SAE may be included in the set R and replaced during the normal iteration sequence. Steps 560, 570 demonstrate an iteration mechanism over individual SAEs. Iteration may also be implemented over one or more groups of SAEs. In this case, the decision 580 to replace may be made either manually or automatically for the group as a whole. For example, the SAEs may be grouped by surface form. The set replace function 590 has three arguments: an SAE, a set of source SOs, and a set of target SOs. The set replace function removes links to the source SOs and adds links to the target SOs.
Semantic Copy and Paste and Semantic Cut and Paste
Turning now to
The system then identifies at 620 a set, S, of Ps in a Menu Library ML that are referentially compatible with the SOs in the set U. This involves identifying the unique set of types of properties of the SOs in the set U and comparing these with the required and optional types for each of the Ps in the ML.
A Menu (M) is a display that lists the actions that may be performed by the system given (a) the contents of a buffer (possibly null), (b) a location in the local document (e.g., point in a document or data structure), and (c) a set of operations the system can perform. Menus may be designed to be “fixed” in their location (e.g., as in an item in a menu bar) or dynamic (as in a “pop-up” presentation). A menu may include auditory presentations. The Menu can be invoked in a variety of ways (well represented in contemporary systems). As a practical matter, the Menu will list the types of “paste” actions that a user can request the system to perform.
The Menu Library (ML) is a set of Ps reflecting the structure and display characteristics of the data on which Menu actions can be performed. An example of a P in the ML might be the specifications for the presentation of a list of specific types of items; or a list that displays a specific set of Properties of SOs; or a table with rows and columns filled in with particular types of information; or a graph of a particular type (e.g., pie chart) where the input values derive from a function on Properties of SOs of particular types; etc.
A P is “referentially-compatible” to one or more SOs if and only if (a) all the required, (b) any optional, and (c) none of the prohibited attribute/value/property types of the P are present in at least one of the SOs
Returning to
At this point, the system is prepared to enable the choices in the menu along with the associated required actions for the Ps in the set S as shown at 640. In the menu, the choices corresponding to the Ps may be organized, e.g., hierarchically in cascading sub-menus, for more efficient display. Note that the set S may be empty in step 640 as a result of incompatibility of the Ps in the set S with the TR and the filtering of the set S in step 635. The set S may also be empty because there were no SAEs in the SR as determined in step 610. In the event that the set S is empty, the system indicates that no semantic copy operation is possible. However, the system may be configured to perform one or more default non-semantic copy operations, provided they are compatible with the TR. Based on the available operations, including defaults, choices are displayed at 645 in the menu.
There are a variety of techniques in common practice for making the menu available to the user, including having the user navigate to a fixed location in a menu tab or having the user invoke a pop-up display of the menu through an action such as depressing a mouse button. The disclosed method does not depend on any particular method. When the user indicates at 655 which operation to perform, the system executes the operation in the TR at step 155. Execution involves a process in which the required attributes/values/properties for display (insertion) are retrieved from the SOs and presented in the format specified by the P (possibly determined, in part, by the P or Ps or other features/constraints in the context that scope over the selected TR).
Note that the steps 610, 615, and 620 (designated “A” in
The steps for semantic copy and paste as described above can also provide the functionality required for semantic cut and paste. The difference is that, upon execution of the paste operation, the system deletes from the IO the contents of the SR.
The process illustrated in the flowchart of
The “after” representation represents what the TR looks like after the semantic copy and past operation is completed. Note the disambiguation, uniquely identified persons, and “discovery” of new information. Even with a detailed understanding of the semantic underpinnings, the “after” presentation is clearly a surprising result.
Semantically informed text operations require maintenance of the links between surface regions and semantic objects, both in the local documents where the surface regions appear and in the remote semantic object repository. Paste operations generally require the creation of new semantically anchored expressions in the target region; the system would copy the type, properties, and link(s) to form the new SAEs, while altering their surface region specifications to match the target location. At runtime, the system would interpret the SAEs in the new location such that their surface expressions would usually match that of the source, though in general the surface expression of copied SAEs might be different due to local presentation constraints (e.g., copying data from a free text region into a structured table). Cut operations generally require the deletion of content from the source region, including SAEs with surface regions that fall within its boundaries. (SAEs that are discontinuous or otherwise have only partial extension within the source region are special cases that must be handled separately, perhaps by truncating their associated surface regions.) Thus, those of ordinary skill in the art will recognize such “housekeeping” matters are necessary for the system to keep track of the location and changes in location of the surface form of the SAE. Such matters are well within the skill of those of ordinary skill in the art and therefore need not be further discussed.
Semantic Merge
An advantage of a merge operation informed with semantic information is that, when the user chooses multiple sources to merge, the document management system will try to identify the semantic relevance of the sources and merge together those parts of the sources that are semantically the most relevant. The merge result will also be formatted with respect to the constraints of the target region. Such an operation is more refined and results in merged content that is semantically more coherent than that derived from simple appending, and avoids manual adjustment by the user.
Semantic merge is invoked when the user selects a number of source regions (which can be whole documents) and a target region. The system will first identify SOs in the target region that other SOs can be merged into, and then iterate through each such SO to retrieve type-compatible SOs in the source regions and position them at the right locations in the target SO. Finally the target region SOs will be formatted and displayed under the constraints of the target region. The source regions can be of three types as listed in the table below, or any combinations of them. The target region can also be any of the three types or combinations of them.
In general, a complex SO cannot be merged into a primitive one, and merging different types of regions is subject to the constraints in the target region.
If on the other hand the target region contains at least one SO, the system will then check at 740 to determine if the target region contains a Complex SO (CSO). If not, that means that only primitive SOs are present and primitive SOs do not allow other SOs to be merged into them. In that case, the semantic merge process will end and a default process may be applied, such as a simple append of the SR to the TR such as is discussed below. When there is at least one Complex SOs in the target region, the system will determine at 750 which SOs to merge. The user may select at 755 a list of SOs, or a default strategy will create at 760 a list of all SOs in the target region. The system then iterates through the list of SOs, retrieving at 775 the next SO from the list and performing a merge operation at 780 on the retrieved SO as described below in conjunction with
Turning to
Turning to
The steps of a second embodiment are shown in
If there is at least one Complex SO in the target region, the system will order the list of all SOs in order of their occurrence at 1235. When there is only one SO in the list, the system retrieves at 1265 the first SO and executes the merge operation 780 (see
Turning to
The reader will recognize that the flowcharts presented herein do not reflect all possible conditions and circumstances that may arise when performing the various methods. Those of ordinary skill in the art will recognize that additional steps, procedures, etc., may be required to enable the methods to be practiced in a manner capable of dealing with atypical situations.
While the present invention has been described in conjunction with preferred embodiments thereof, those of ordinary skill in the art will recognize that many modifications and variations are possible. For example, the present invention may be implemented in connection with a variety of different hardware configurations. Additionally, actions such as “select”, “determine”, “define”, “retrieve”, “remove”, etc., should be understood broadly, and be understood as being capable of being performed manually by a user, in an automated manner by the system, or some combination of both. Also, the reader should understand the results of “selecting”, “determining”, “defining”, “retrieving”, “removing”, etc., may result in a zero or null result. Such meanings, modifications and variations fall within the scope of the present invention which is limited only by the following claims.