Intelligent and mode-based optical character recognition
Disclosed are various embodiments for intelligent text recognition based upon a selected pattern detection mode. First, text can be identified in an image. A pattern detection mode can be selected by a user or autonomously. In some instances, the pattern detection mode can be selected based at least in part on a user account. Next, the text can be parsed for occurrences of a pattern associated with the selected pattern detection mode. A list of occurrences of the pattern can be generated from the text and presented to a user. In some instances, a user can train a model to learn a new pattern.
1 . A system, comprising:
a computing device comprising a processor and a memory; and
machine-readable instructions stored in the memory that, when executed by the processor, cause the computing device to at least:
process an image comprising text by using an optical character recognition (OCR) engine to identify the text in the image and generate machine-encoded text based on the identified text;
select, from a plurality of pattern detection modes, a pattern detection mode associated with a pattern defining a format for a plurality of consecutive characters, wherein selecting the pattern detection mode is based on one or more context factors associated with a user account, wherein the one or more context factors include a user interaction history, a mode selection history, or a client device location associated with the user account;
parse the machine-encoded text to identify one or more occurrences of the pattern associated with the selected pattern detection mode;
generate an occurrence list comprising the one or more occurrences of the pattern identified in the machine-encoded text; and
cause a client device associated with the user account to display the occurrence list in a user interface with an option to select the one or more occurrences from the occurrence list.
2 . The system of claim 1 , wherein the machine-readable instructions further cause the computing device to at least:
obtain a request to generate a new pattern;
generate a test pattern based at least in part on training data;
identify one or more occurrences of the test pattern within the text;
save the one or more occurrences of the test pattern in a test list;
generate a prompt for a score on the test list;
obtain a score based at least in part on the test list; and
create the new pattern based at least in part on the test pattern and the score.
3 . The system of claim 1 , wherein the pattern detection mode is customized based at least in part on the user account.
4 . The system of claim 1 , wherein the plurality of pattern detection modes comprise at least one of: an email address mode, a date mode, or a phone number mode.
5 . The system of claim 1 , wherein the selected pattern detection mode is selected by obtaining, from a user interface, a selection of a pattern detection mode.
6 . A method, comprising:
processing, by a computing device, an image comprising text by using an optical character recognition (OCR) to identify the text in the image and generate machine-encoded text based on the identified text;
selecting, by the computing device from a plurality of pattern detection modes, a pattern detection mode associated with a pattern defining a format for a plurality of consecutive characters, wherein selecting the pattern detection mode is based on one or more context factors associated with a user account, wherein the one or more context factors include a user interaction history, a mode selection history, or a client device location associated with the user account;
parsing, by the computing device, the machine-encoded text to identify one or more occurrences of the pattern associated with the selected pattern detection mode;
generating, by the computing device, an occurrence list comprising the one or more occurrences of the pattern identified in the machine-encoded text; and
causing a client device associated with the user account to display the occurrence list in a user interface with an option to select the one or more occurrences from the occurrence list.
7 . The method of claim 6 , further comprising:
obtaining, by the computing device, a request to generate a new pattern;
generating, by the computing device, a test pattern based at least in part on training data;
identifying, by the computing device, one or more occurrences of the test pattern within the text;
saving, by the computing device, the one or more occurrences of the test pattern in a test list;
generating, by the computing device, a prompt for a score on the test list;
obtaining, by the computing device, a score based at least in part on the test list; and
creating, by the computing device, the new pattern based at least in part on the test pattern and the score.
8 . The method of claim 6 , wherein the pattern detection mode is customized based at least in part on the user account.
9 . The method of claim 6 , wherein the plurality of pattern detection modes include at least one of: an email address mode, a date mode, or a phone number mode.
10 . The method of claim 6 , wherein the selected pattern detection mode is selected by obtaining, from a user interface, a selection of a pattern detection mode.
11 . A non-transitory, computer-readable medium, comprising machine readable instructions that, when executed by a processor of a computing device, cause the computing device to at least:
process an image comprising text by using an optical character recognition (OCR) engine to identify the text in the image and generate machine-encoded text based on the identified text;
select, from a plurality of pattern detection modes, a pattern detection mode associated with a pattern defining a format for a plurality of consecutive characters, wherein selecting the pattern detection mode is based on one or more context factors associated with a user account, wherein the one or more context factors include a user interaction history, a mode selection history, or a client device location associated with the user account;
parse the machine-encoded text to identify one or more occurrences of the pattern associated with the selected pattern detection mode;
generate an occurrence list comprising the one or more occurrences of the pattern identified in the machine-encoded text; and
cause a client device associated with the user account to display the occurrence list in a user interface with an option to select the one or more occurrences from the occurrence list.
12 . The non-transitory, computer-readable medium of claim 11 , wherein the machine-readable instructions further cause the computing device to at least:
obtain a request to generate a new pattern;
generate a test pattern based at least in part on training data;
identify one or more occurrences of the test pattern within the text;
save the one or more occurrences of the test pattern in a test list;
generate a prompt for a score on the test list;
obtain a score based at least in part on the test list; and
create a new pattern based at least in part on the test pattern and the score.
13 . The non-transitory, computer-readable medium of claim 11 , wherein the pattern detection mode is customized based at least in part on the user account.
14 . The non-transitory, computer-readable medium of claim 11 , wherein the plurality of pattern detection modes include at least one of: an email address mode, a date mode, or a phone number mode.
15 . The non-transitory, computer-readable medium of claim 11 , wherein the selected pattern detection mode is selected by obtaining, from a user interface, a selection of a pattern detection mode.