BACKGROUND

Many types of documents have an explicit section structure, that is, headers that delimit blocks of the text and set expectations about the content and purpose of that block. Automatically labeling sections with a pre-defined ontology of section types is useful for document understanding and has been shown to improve tasks as varied as information extraction, data mining, and document search. Automatically labeling sections with their types requires not just a list of possible sections, but also what different headers are used for each, their usual order (with possible exceptions), and the type of language normally found within. Also, manually creating this knowledge is laborious and error prone.

BRIEF SUMMARY

In view of the above, there is a need in the art for a solution to automatically discovering the information needed for automatic labeling of documents sections (e.g., automatically discovering from examples). Automatically discovering types of sections is challenging; for a document class (e.g., a psychiatric evaluation or a U.S. Patent), the presence of a particular section type is often ambiguous. First, there is great variety and ambiguity in the section headers; second, sections are sometimes included within other sections; third, the section order might not be strict; and fourth, sections may be omitted for a variety of reasons. Embodiments of the subject invention provide systems and methods for discovering and/or determining section types for a given document class in a data-driven manner. A modified Bayesian model merging algorithm (see Stolcke et al., Inducing probabilistic grammars by bayesian model merging, In International Colloquium on Grammatical Inference, pages 106-118, Springer, 1994; which is hereby incorporated by reference herein in its entirety) can be used, along with extending an Analogical Story Merging (ASM) algorithm (see Finlayson, Inferring propp's functions from semantically annotated text, The Journal of American Folklore, 129(511):55-77, 2016; which is hereby incorporated by reference herein in its entirety). The systems and methods can be used on a wide variety of types of documents, including but not limited to documents in the clinical domain (e.g., psychiatric evaluations, discharge summaries, radiology reports, etc.) and documents in the intellectual property (IP) domain (e.g., U.S. patents, etc.).

In an embodiment, a system for determining section types of a given document class can comprise: a processor; a memory in operable communication with the processor; and a (non-transitory) machine-readable medium in operable communication with the processor and the memory, the machine-readable medium having instructions stored thereon that, when executed by the processor, perform the following steps: receiving a corpus of documents of the given document class; using a modified Bayesian model merging algorithm on the corpus to determine the section types of the given document class; and storing the determined section types on the memory to be used for labeling a document of the given document class. The using of the modified Bayesian model merging algorithm on the corpus can comprise extending an ASM approach with a Bayesian model merging algorithm. The using of the modified Bayesian model merging algorithm on the corpus can comprise: creating an initial Hidden Markov Model (HMM)-like model, where each document of the corpus is represented as a linear chain of states, with each state of the linear chain of states corresponding to a section of unknown type in a same order as found in the respective document of the corpus; performing a merge operation on the initial HMM-like model to merge states and generate an updated model; defining a prior probability distribution (or a “prior”) over the updated model; computing a posterior probability distribution based on the prior probability distribution; and searching a merge space of the updated model based on the posterior probability distribution to determine the section types of the given document class. The searching of the merge space of the updated model can comprise maximizing the posterior probability distribution to give a generalizable model that fits the corpus. The computing of the posterior probability distribution can comprise computing P(M)P(D|M), which is proportional to P(M|D), where P(M) is the prior probability distribution, P(M|D) is the posterior probability distribution, M represents the updated model, and D represents a document of the corpus. The defining of the prior probability distribution can comprise using Equations (1) and (2) as defined herein. The similarity threshold (T) can be set as 1.5 standard deviations from a mean similarity of the similarity function; and/or if headers of all sections in the updated model are exactly the same, G(Si) is set to 1. The corpus of documents can comprise, for example, at least 100 documents (e.g., at least 150 documents). The given document class can be, for example, a psychiatric evaluation, a discharge summary, a radiology report, or a United States patent document.

In another embodiment, a method for determining section types of a given document class can comprise: receiving (e.g., by a processor) a corpus of documents of the given document class; using (e.g., by the processor) a modified Bayesian model merging algorithm on the corpus to determine the section types of the given document class; and storing (e.g., by the processor) the determined section types (e.g., on a memory in operable communication with the processor) to be used for labeling a document of the given document class. The using of the modified Bayesian model merging algorithm on the corpus can comprise extending an ASM approach with a Bayesian model merging algorithm. The using of the modified Bayesian model merging algorithm on the corpus can comprise: creating an initial HMM-like model, where each document of the corpus is represented as a linear chain of states, with each state of the linear chain of states corresponding to a section of unknown type in a same order as found in the respective document of the corpus; performing a merge operation on the initial HMM-like model to merge states and generate an updated model; defining a prior probability distribution over the updated model; computing a posterior probability distribution based on the prior probability distribution; and searching a merge space of the updated model based on the posterior probability distribution to determine the section types of the given document class. The searching of the merge space of the updated model can comprise maximizing the posterior probability distribution to give a generalizable model that fits the corpus. The computing of the posterior probability distribution can comprise computing P(M)P(D|M), which is proportional to P(M|D). The defining of the prior probability distribution can comprise using Equations (1) and (2) as defined herein. The similarity threshold (T) can be set as 1.5 standard deviations from a mean similarity of the similarity function; and/or if headers of all sections in the updated model are exactly the same, G(Si) is set to 1. The corpus of documents can comprise, for example, at least 100 documents (e.g., at least 150 documents). The given document class can be, for example, a psychiatric evaluation, a discharge summary, a radiology report, or a United States patent document.

