Annotating embedded tables
AssigneeInternational Business Machines Corporation
InventorsBarton W. Emanuel, Martin N. Saunders, Adam F. Severino, Craig M. Trim
Life of this patent
Estimating the term…
Abstract
Embodiments of the present invention provide systems and methods for extracting and annotating text. Heuristics are applied to extracted text data in order to detect the readability of the text data. The text data is converted to an intermediate form. The transformed intermediate form is converted back to the original text format. Character and feature correspondence; positional logic; and queries to determine if the text data within a line corresponds with a token header are used to maintain the formatting and annotate the original text.
Claims15
A method for extracting and annotating text, the method comprising the steps of:
- performing, by one or more processors, a copying operation on a first source;
- extracting, by one or more processors, text data from the copy operation, wherein the text data comprises a stream of characters in a first text format;
- applying, by one or more processors, heuristics to extracted text data from the first source, wherein the heuristics detect readability of the text data;
- encoding, by one or more processors, the text data into a second text format, wherein encoding the text data into the second text format maintains structures and elements of the text data;
- transforming, by one or more processors, the second text format into annotations with the first text format;
- performing, by one or more processors, a pasting operation on the transformed annotations in the first text format while maintaining a respective arrangement of the structure and elements of the first text format;
- responsive to transforming the second text format into the annotations with the first text format, resolving, by one or more processors, offsets into the first source to maintain a format, structure, and elements of the annotations within a matrix structure;
- applying, by one or more processors, validating analytics on the extracted text data, the annotations with the first text format, and search queries within the matrix structure, wherein the validating analytics comprise at least:
- delimitation and position logic;
- responsive to analyzing the search queries by applying the validation analytics, determining, by one or more processors, if the text data a line corresponds with a token header, wherein the line is contained within the matrix structure;
- determining, by one or more processors, character and feature correspondence, wherein a token on a first line has a same character and feature correspondence as another token on a second line;
- and
- utilizing, by one or more processors, the positional logic to identify missing values within the text data, as contained within the matrix structure.
A computer program product for extracting and annotating text, the computer program product comprising:
- a computer readable storage medium and program instructions stored on the computer readable storage medium, the program instructions comprising:
- program instructions to perform a copying operation on a first source;
- program instructions to extract text data from the copy operation, wherein the text data comprises a stream of characters in a first text format;
- program instructions to apply heuristics to extracted text data from the first source, wherein the heuristics detect readability of the text data;
- program instructions to encode the text data into a second text format, wherein the program instructions to encode the text data into the second text format maintain structures and elements of the text data;
- program instructions to transform the second text format into annotations with the first text format;
- program instructions to perform a pasting operation on the transformed annotations in the first text format while maintaining a respective arrangement of the structure and elements of the first text format;
- responsive to program instructions to transform the second text format into the annotations with the first text format, program instructions to resolve offsets into the first source to maintain a format, structure, and elements of the annotations within a matrix structure;
- program instructions to apply validating analytics on the extracted text data and the annotations with the first text format within the matrix structure, wherein the validating analytics comprise at least:
- delimitation and position logic;
- responsive to program instructions to analyze the search queries by applying the validation analytics, program instructions to determine if the text data within a line corresponds with a token header, wherein the line is contained within the matrix structure;
- program instructions to determine character and feature correspondence, wherein a token on a first line has the same character and feature correspondence as another token on a second line;
- and
- program instructions to utilize positional logic in order to identify missing values within the text data, as contained within the matrix structure.
A computer system for extracting and annotating text, the computer system comprising:
- one or more computer processors;
- one or more computer readable storage media;
- program instructions stored on the one or more computer readable storage media for execution by at least one of the one or more processors, the program instructions comprising:
- program instructions to perform a copying operation on a first source;
- program instructions to extract text data from the copy operation, wherein the text data comprises a stream of characters in a first text format;
- program instructions to apply heuristics to extracted text data from the first source, wherein the heuristics detect readability of the text data;
- program instructions to encode the text data into a second text format, wherein the program instructions to encode the text data into the second text format maintain structures and elements of the text data;
- program instructions to transform the second text format into annotations with the first text format;
- program instructions to perform a pasting operation on the transformed annotations in the first text format while maintaining a respective arrangement of the structure and elements of the first text format;
- responsive to program instructions to transform the second text format into the annotations with the first text format, program instructions to resolve offsets into the first source to maintain a formation, structure, and elements of the annotations within a matrix structure;
- program instructions to apply validating analytics on the extracted text data and the annotations with the first text format within the matrix structure, wherein the validating analytics comprise at least:
- delimitation and position logic;
- responsive to program instructions to analyze the search queries by applying the validation analytics, program instructions to determine if the text data within a line corresponds with a token header, wherein the line is contained within the matrix structure;
- program instructions to determine character and feature correspondence, wherein a token on a first line has the same character and feature correspondence as another token on a second line;
- and
- program instructions to utilize positional logic in order to identify missing values within the text data, as contained within the matrix structure.
Dependencies are inferred from the claim text.