Method and system for word edit distance embedding
Patent Information
- Application Number
- JP2022561420
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2020-04-10
- Filing Date
- 2020-10-16
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2040-10-16
AI Technical Summary
Existing technologies face challenges in securely anonymizing and classifying personal information during data transmission to comply with regulations like GDPR without storing the original words, while maintaining accuracy in classification.
A neural network-based system that approximates an edit-distance-based metric using word vectors, allowing for classification and anonymization by encoding words into matrices and using twin convolutional neural networks to calculate cosine similarity, ensuring secure classification without storing the original data.
Enables accurate classification and anonymization of personal information during data transmission, reducing the risk of data exposure and compliance with privacy regulations by classifying words without storing the original data, thus enhancing privacy protection.
Abstract
Description
[Technical Field]
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS This application claims the benefit of priority to U.S. Provisional Patent Application No. 63 / 008,552, filed April 10, 2020, the disclosure of which is incorporated herein by reference in its entirety.
[0002] This patent application relates to text similarity computation, and in particular to word edit distance embedding. [Background technology]
[0003] Companies that handle personal information, whether it be employee information, medical data, or financial information, are required to protect that information and limit its use. Furthermore, all collected data is to be anonymized and stored only for as long as necessary. Governments around the world have enacted regulations, such as the European Union's General Data Protection Regulation (GDPR), in an effort to support the protection of personal information. Summary of the Invention [Problem to be solved by the invention]
[0004] The present invention has been made to solve the problems in the prior art described above. [Means for solving the problem]
[0005] The systems and methods described herein will be better understood by reference to the following detailed description in conjunction with the accompanying drawings, in which like reference numbers indicate identical or functionally similar elements.
[0006] Headings provided herein are for convenience only and do not necessarily affect the scope of the embodiments. Moreover, the drawings are not necessarily drawn to scale. For example, the dimensions of some of the elements in the drawings may be expanded or reduced to help improve understanding of the embodiments. Furthermore, while the technology of the present disclosure is susceptible to various modifications and alternative forms, specific embodiments are shown by way of example in the drawings and are described in detail below. However, this is not intended to unnecessarily limit the described embodiments. Rather, the embodiments are intended to encompass all modifications, combinations, equivalents, and alternatives falling within the scope of the present disclosure. [Brief explanation of the drawings]
[0007] [Figure 1] FIG. 1 is a flow diagram illustrating a method of operation of a processor-based word edit distance embedding system in accordance with some implementations of the present technology. [Figure 2] FIG. 1 is a flow diagram illustrating a method for training a neural network to classify words, according to some embodiments of the present technology. [Figure 3] 1 illustrates a two-dimensional matrix for encoding words in accordance with some embodiments of the present technology. [Figure 4] FIG. 1 is a schematic diagram of a training architecture having twin convolutional neural networks, in accordance with some implementations of the present technology. [Figure 5] FIG. 1 is a flow diagram illustrating a method for setting up a word vector index for use in classifying words according to some implementations of the present technology. [Figure 6] 10 is a chart showing dictionary word embeddings and associated classes and thresholds. [Figure 7] FIG. 1 is a flow diagram illustrating a method for classifying words in accordance with some implementations of the present technology. [Figure 8] 1 is a block diagram illustrating an overview of an apparatus in which some embodiments can operate. [Figure 9] 1 is a block diagram illustrating an overview of an environment in which some embodiments can operate. [Figure 10] FIG. 1 is a block diagram illustrating components that can be used in systems employing techniques of the present disclosure in some embodiments. DETAILED DESCRIPTION OF THE INVENTION
[0008] Various embodiments of the systems and methods introduced above will now be described in detail. In the following description, specific details are provided to provide a thorough understanding and practical explanation of these embodiments. However, as will be appreciated by those skilled in the art, the methods and techniques described herein can be practiced without many of these details. Likewise, as will be appreciated by those skilled in the art, the present technology may also include many other features not described in detail herein. Furthermore, to avoid unnecessarily obscuring important information, some well-known structures or functions may not be shown or described in detail below.
[0009] The terms used below should be given their broadest reasonable interpretation, even when used in conjunction with detailed descriptions of some specific examples of embodiments. Indeed, although some terms may be emphasized more below, if any term is intended to be given a restrictive interpretation, it is expressly and specifically defined in this section to be so interpreted.
[0010] A method and system for classifying unknown words using a novel neural network and similarity search architecture is disclosed. In the context of privacy, it is desirable to monitor whether personal information is being transmitted within a network and / or across networks. The disclosed techniques enable monitoring of those transmissions by securely anonymizing words in those transmissions and comparing them with words in various class dictionaries (e.g., country, name, ethnicity, language, religion, gender, marital status, etc.) to identify the class of information being transmitted. Advantageously, the disclosed techniques securely anonymize and classify words without ever storing the original words.
[0011] In some embodiments, a neural network is trained and retrained so that the distance between pairs of vectors in a word-based dictionary dataset approximates an edit-distance-based metric between corresponding words. Training involves creating vectors for all dictionary words with the trained neural network and storing these vectors in a specialized structure. A matching algorithm then creates vectors for all words in a batch process. This involves finding the nearest match for each word and applying a score based on the distance to the nearest dictionary match to determine each word's classification.
[0012] 1 is a high-level flow diagram illustrating a method 100 of operation of a processor-based word edit distance embedding system for classifying a batch of data (e.g., words) according to some implementations of the present technology. The method may include step 102 of training a neural network (NN) with pairs of words such that the distance between corresponding vectors approximates an edit-distance-based metric between the words. In step 104, vectors for dictionary word selection are created by the trained NN. The resulting vectors may be stored in step 106. Then, in step 108, vectors are created for all words in the batch of words to be classified. In step 110, the closest match for each word in the batch is determined. In some embodiments, in step 112, a score based on the distance to the associated closest match may be applied to each word in the batch.
[0013] FIG. 2 illustrates a method 200 for training a neural network to classify words according to some implementations of the present technology. In some embodiments, the neural network may be a convolutional neural network (CNN). Training the CNN may include, for example, encoding each of a plurality of training words into a matrix format (FIG. 3) at step 202. The training words may include a dictionary of words belonging to a particular class (e.g., country, name, ethnicity, language, religion, gender, marital status, etc.). The training dictionary may include a base dictionary, a full English dictionary, and a non-word dictionary (which includes data that does not resemble any dictionary-like type of data).
[0014] In step 204, a CNN and a CNN twin (FIG. 4) are used to create pairs of training vectors for multiple pairs of encoded training words. The pairs may be randomly selected from a training dictionary for training when the word edit distance is large, or may be created by adding noise to the words for training when the word edit distance is small.
[0015] A similarity metric (SM) is calculated for each of the plurality of pairs of the plurality of training words in step 206. The SM may be calculated based on an edit distance (ED) (e.g., Levenshtein ED) as follows: SM(word1, word2) = 1 - ED(word1, word2) / max(length(word1), length(word2)) In some embodiments, the SM may be based on an encoded form of the word.
[0016] In step 208, the similarity metric and cosine similarity are compared for each pair of training words, and the CNN is adjusted (e.g., weights are adjusted) based on this comparison to drive the cosine similarity between the pair to match the similarity metric. Using cosine similarity between vectors instead of Euclidean distance reduces computation time and improves computation accuracy. Once the CNN is trained, in step 210, the trained CNN is stored. In some embodiments, cosine similarity may be calculated by dividing the dot product of a pair of vectors by the product of their Euclidean norms.
[0017] Using the above-described similarity metric rather than the traditional Levenshtein ED improves search. This can be illustrated with two examples: two two-letter codes, PL and PS, and two words, Poland and Roland. Both of these pairs have an ED of 1. However, a value of 1 has a much larger effect on the first pair because it changes half of the words. Therefore, if the edit distance error is around 1, using ED is much less accurate for short words than for longer words. In contrast, the disclosed similarity metric is less accurate for longer pairs (especially those with a large edit distance), but this is acceptable in the disclosed system because we search for words within a certain range, and the exact distance value is not very important as long as it is not too large. In some embodiments, the minimum similarity threshold for accepting a match is 0.7.
[0018] FIG. 3 illustrates a two-dimensional matrix 220 for encoding a word (e.g., "Poland") in accordance with some implementations of the present technology. The two-dimensional matrix of the present disclosure is similar to that described in "Levenshtein Space Deep Embedding (LSDE) for Query-by-string Word Spotting" by Lluis Gomez, Marcal Rusinol, and Dimosthenis Karatzas (International Conference on Document Analysis and Recognition (ICDAR) 2017), which is incorporated herein by reference in its entirety. Matrix 220 includes a first dimension 222 containing 26 English letters and four special characters, and a second dimension 224 containing character positions within the string. The number of character positions may be limited to, for example, 50, resulting in a 30×50 matrix. Note that, as outlined below, matrix 220 is capable of encoding alphabetic and non-alphabetic characters, as well as the "empty" character.
[0019] The characters in the data set may be grouped as follows: 1 English letters - English letters are standardized
number
[0020] FIG. 4 is a schematic diagram of a training architecture 300 having twin convolutional neural networks according to some implementations of the present technology. The twin CNNs 302(1) and 302(2) have the same structure and the same weights. The input to the twin CNNs is the same 30×50 matrix 304, such as the matrix described above with respect to FIG. 3. In some embodiments, the CNN applies a convolutional layer 308 with 64 kernels 306 of size 30×3 and a fully connected layer 310 with 128 output neurons. For each pair of vectors corresponding to word 1 and word 2, a cosine similarity 312 is calculated and compared to the similarity metric between the encoded words 1 and 2 to derive a “loss” 316. The CNN is driven to learn the optimal transformation of words (e.g., strings of characters) into vector form such that the cosine similarity distance between the vectors is equivalent to the similarity metric of their original words. In other words, the loss 316 is driven toward zero.
[0021] FIG. 5 is a flow diagram illustrating a method 400 for setting up a word vector index for use in classifying words according to some implementations of the present technology. After a CNN is trained as described above with respect to FIGS. 2-4, a plurality of dictionary words are encoded into a matrix format (e.g., the matrix described above with respect to FIG. 3) in step 402. In some embodiments, the dictionary words used to train the CNN may include the dictionary words used for classification. In step 404, a dictionary vector for each of the plurality of encoded dictionary words is created using the trained CNN. In step 406, the resulting dictionary vectors are stored with the classes corresponding to the associated dictionary words. In step 408, the dictionary word vectors may be indexed for efficient search. In some embodiments, the vector indexing is performed according to the Facebook Artificial Intelligence Similarity Search (FAISS) technique. FIG. 6 illustrates an example data structure 420 for dictionary word vector embeddings 426 and associated classes 428 and thresholds 430. For example, a country dictionary 422 contains the names of various countries, and a name dictionary 424 contains various first names. Each country and first name corresponds to a vector embedding 426. The class code 428 is "0" for country and "1" for name. The data structure 420 includes a mapping 430 of class codes and class thresholds to each vector embedding. In some embodiments, the thresholds for each class may be determined empirically to minimize false positives.
[0022] FIG. 7 is a flow diagram illustrating a method 500 for classifying words in accordance with some implementations of the present technology. Once the CNN is trained and the dictionary word index is prepared, words of interest within a batch of words may be classified to determine whether the words in the batch correspond to any sensitive class of data (e.g., personal information). In step 502, a batch of words is received for classification but not stored. In step 504, the received words are encoded into a matrix format. This can be done, for example, using the technique described above with respect to FIG. 3. In step 506, a word vector for each of the encoded batch words is created using the trained CNN. In step 508, the closest match and score for each resulting word vector in the batch is found in the index of dictionary word vectors. This is done by searching for nearest neighbors (e.g., using the FAISS library). FAISS is a library for efficient similarity search and clustering of dense vectors. It includes algorithms for searching among collections of vectors of any size. In step 510, the average results for each class corresponding to the batch of words are reported.
[0023] Step 510 can be illustrated with an example batch containing two words, Holland and Cuba. For each word, the four closest matches and corresponding scores are found as follows: Holland - Holland, Poland, Roland, Holland Cuba - Cuba, Coby, Curt, Aruba
[0024] Each match is associated with a class and a retrieved score as follows: Holand - Holand(Last name - 1.0), Poland(Country - 0.8), Roland(First name - 0.8), Holland(Country - 0.8) Cuba - Cuba (Country - 1.0), Coby (First Name - 0.5), Curt (First Name - 0.5), Aruba (Country - 0.6)
[0025] For each word in the batch, the best score for each class is selected as follows: Holand - Last Name: 1.0, Country: 0.8, First Name: 0.8 Cuba - Country: 1.0, First Name: 0.5
[0026] The following class thresholds are given: Country:0.8 Last Name: 0.8 First Name: 0.7
[0027] The above thresholds are applied to the highest score in each class. If a score is equal to or greater than the corresponding threshold, it is left as is, and if it is less than the threshold, it is treated as 0, as follows: Holand - Last Name: 1.0, Country: 0.8, First Name: 0.8 Cuba - Country: 1.0, First Name: 0
[0028] The results for each class are then averaged as follows: Last name: (1+0) / 2=0.5 Country:(0.8+1) / 2=0.9 First name: (0.8+0) / 2=0.4
[0029] The results are reported as follows: Country:0.9 Last Name: 0.5 First Name: 0.4
[0030] The reported results can indicate to the user the likelihood that a particular classification of data (e.g., country, last name, and first name) is being transmitted on the system, without storing or exposing the original data. The right system
[0031] The techniques disclosed herein may be embodied as dedicated hardware (e.g., circuitry), as programmable circuitry appropriately programmed with software and / or firmware, or as a combination of dedicated and programmable circuitry. Accordingly, embodiments may include a machine-readable medium having instructions stored thereon, which may be used to cause a computer, microprocessor, processor, and / or microcontroller (or other electronic device) to perform a process. The machine-readable medium may include, but is not limited to, an optical disk, a compact disk read-only memory (CD-ROM), a magneto-optical disk ROM, a random access memory (RAM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic or optical card, a flash memory, or any other type of medium / machine-readable medium suitable for storing electronic instructions.
[0032] Some embodiments are discussed in detail below with reference to the drawings. FIG. 8 is a block diagram illustrating an overview of devices in which some embodiments of the disclosed technology can operate. These devices may include hardware components of a device 700 that determines risk scores and associated pricing and / or risk ratios. The device 700 may include one or more input devices 720 that provide input to a CPU (processor) 710 to signal actions. Actions are typically mediated by a hardware controller that interprets signals received from the input devices and communicates information to the CPU 710 using a communication protocol. The input devices 720 may include, for example, a mouse, keyboard, touchscreen, infrared sensor, touchpad, wearable input device, camera-based or image-based input device, microphone, or other user input device.
[0033] The CPU 710 may be a single processing unit or multiple processing units within a single device or distributed across multiple devices. The CPU 710 may be coupled to other hardware devices, for example, using a bus such as a PCI bus or a SCSI bus. The CPU 710 may communicate with a hardware controller for the device (e.g., for the display 730). The display 730 may be used to display text and graphics. In some embodiments, the display 730 provides visual feedback of graphics and text to the user. In some implementations, the display 730 includes an input device as part of the display. This is the case, for example, when the input device is a touchscreen or includes an eye-gaze monitoring system. In some implementations, the display and input device are separate. Examples of display devices include an LCD display screen, an LED display screen, a projection display, a holographic display, or an augmented reality display (e.g., a head-up display device or a head-mounted device). Other I / O devices 740 may also be coupled to the processor, such as a network card, a video card, an audio card, a USB, Firewire or other external device, a camera, a printer, speakers, a CD-ROM drive, a DVD drive, a disk drive, or a Blu-Ray device.
[0034] In some embodiments, the apparatus 700 also includes a communication device capable of communicating with a network node wirelessly or via a wired connection. The communication device is capable of communicating with another device or a server over a network (e.g., using the TCP / IP protocol). The apparatus 700 may utilize the communication device to distribute operations across multiple network devices.
[0035] The CPU 710 can access memory 750. Memory may include one or more of a variety of hardware devices for volatile and non-volatile storage, and may include both read-only and writable memory. For example, memory may include random access memory (RAM), CPU registers, read-only memory (ROM), and writable non-volatile memory (e.g., flash memory, hard drives, floppy disks, CDs, DVDs, magnetic storage devices, tape drives, device buffers, etc.). Memory is not a propagating signal separate from the underlying hardware. Thus, memory is non-transitory. Memory 750 may include program memory 760, which stores programs and software such as an operating system 762, a word edit distance embedding platform 764, and other application programs 766. Memory 750 may also include data memory 770, which may include database information, etc., that may be provided to program memory 760 or any element of device 700.
[0036] Some implementations are operational with numerous other general-purpose or special-purpose computing system environments or configurations. Examples of well-known computing systems, environments, and / or configurations that may be suitable for use with the present technology include, but are not limited to, personal computers, server computers, handheld or laptop devices, cellular telephones, mobile telephones, wearable electronics, gaming consoles, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments that include any of the above systems or devices.
[0037] 9 is a block diagram illustrating an overview of an environment 800 in which some implementations of the disclosed technology can operate. The environment 800 can include one or more client computing devices 805A-D, examples of which can include device 700. The client computing devices 805 can operate in a networked environment using logical connections with one or more remote computers (e.g., server computing device 810) via a network 830.
[0038] In some embodiments, server computing device 810 may be an edge server, which receives client requests and coordinates with other servers (e.g., servers 820A-C) to fulfill those requests. Server computing devices 810 and 820 may include computing systems such as device 700. Although each server computing device 810 and 820 is logically depicted as a single server, the server computing devices may each be in a distributed computing environment that includes multiple computing devices at the same physical location or at multiple geographically distinct physical locations. In some embodiments, each server computing device 820 corresponds to a group of servers.
[0039] Client computing device 805 and server computing devices 810 and 820 may each act as a server or client to other server / client devices. Server 810 may connect to database 815. Servers 820A-C may each connect to corresponding databases 825A-C. As described above, each server 820 may represent a group of servers, each of which may share a database or each have its own database. Databases 815 and 825 may repository (e.g., store) information. Although shown logically as a single unit, databases 815 and 825 may each be in a distributed computing environment encompassing multiple computing devices, or each may reside within a corresponding server, or may reside in the same physical location or multiple geographically distinct physical locations.
[0040] Network 830 may be a local area network (LAN) or a wide area network (WAN), or other wired or wireless network. Network 830 may be the Internet or any other public or private network. Client computing devices 805 may be connected to network 830 via a network interface (e.g., by wired or wireless communication). Although the connections between server 810 and server 820 are shown as separate connections, these connections may be any type of local network, wide area network, wired network, or wireless network, including network 830 or a separate public or private network.
[0041] 10 is a block diagram illustrating components 900 that, in some embodiments, can be used in a system employing the techniques of this disclosure. Components 900 include hardware 902, general-purpose software 920, and specialized components 940. As described above, a system implementing the techniques of this disclosure may use a variety of hardware, including a processing unit 904 (e.g., a CPU, GPU, APU, etc.), working memory 906, storage memory 908, and input / output devices 910. Components 900 may be implemented in a client computing device, such as client computing device 805, or in a server computing device, such as server computing device 810 or 820.
[0042] General-purpose software 920 may include various applications, including an operating system 922, local programs 924, and a basic input / output system (BIOS) 926. Specialized components 940 may be subcomponents of general-purpose software application 920 (e.g., local programs 924). Specialized components 940 may include a preparation module 944, a training module 946, a matching module 948, and components (e.g., interface 942) that can be used to transfer data and control the specialized components. In some implementations, components 900 may reside in a computing system distributed across multiple computing devices or may be an interface to a server-based application that executes one or more of the specialized components 940.
[0043] As will be appreciated by those skilled in the art, the components illustrated in Figures 8-10 and the flow diagrams described above may be modified in various ways. For example, the order of logic may be rearranged, substeps may be performed in parallel, illustrated logic may be omitted, other logic may be included, etc. In some implementations, one or more of the above-described components may perform one or more of the processes described herein.
[0044] While certain embodiments have been shown in the drawings and described in detail by way of example, other embodiments are possible. For example, in some embodiments, a system for classifying words in a batch of words may include at least one memory device storing instructions that cause at least one processor to: use a neural network (NN) to create a dictionary vector for each of a plurality of dictionary words; store each dictionary vector with a classification indicator corresponding to the associated dictionary word; and use the NN to create a word vector for each word in the batch of words for classification. A closest matching dictionary vector for each word vector is found, and the classification indicator of the closest matching dictionary vector for each word vector is reported.
[0045] In some embodiments, the dictionary words and the words in the batch are encoded into a 30-character by 50-character matrix. In some embodiments, the NN is a convolutional neural network. In some embodiments, each word vector is created without storing the corresponding words in the batch. In some embodiments, each dictionary vector and corresponding classification indicator are indexed to facilitate similarity search. In some embodiments, the system may further include training the NN, which may include calculating a similarity metric for a plurality of pairs of training words, using the NN and the twin of the NN to create a pair of training vectors for each of the plurality of pairs of training words, calculating a cosine similarity between the training vectors of each pair, comparing the similarity metric and the cosine similarity for each pair of training words, and adjusting the NN based on the comparison. In some embodiments, the training words include dictionary words. In some embodiments, the similarity metric is equal to one less the Levenshtein edit distance divided by the length of the longest word in the pair. In some embodiments, the cosine similarity is calculated by dividing the dot product of the pair of training vectors by the product of their Euclidean norms. In some embodiments, each of the one or more closest matching dictionary vectors has an associated score, and reporting the classification indicator of the one or more closest matching dictionary vectors for each word vector in the batch includes, for each word in the batch, selecting the highest score for each classification indicator and averaging the selected highest scores for each classification indicator.
[0046] In another representative embodiment, a system for classifying words in a batch of words may include at least one memory device that stores instructions that cause at least one processor to: train a convolutional neural network (CNN); encode each of a plurality of dictionary words into a matrix form; use the trained CNN to create a dictionary vector for each of the plurality of encoded dictionary words; store each dictionary vector with a classification indicator corresponding to an associated dictionary word; encode each word in the batch of words into a matrix form for classification; use the trained CNN to create a word vector for each encoded word in the batch; find a closest matching dictionary vector for each word vector; and report a classification indicator of the closest matching dictionary vector for each word vector in the batch. Training the CNN may include encoding each of a plurality of training words into a matrix form, calculating a similarity metric for a plurality of pairs of the plurality of training words, using the CNN and a twin of the CNN to create a pair of training vectors for each pair of encoded training words corresponding to the plurality of pairs, calculating a cosine similarity between each pair of training vectors, comparing the similarity metric and the cosine similarity for each pair of training words and adjusting the CNN based on the comparison, and storing the trained CNN.
[0047] In another representative embodiment, a system for classifying words in a batch of words may include at least one memory device that stores instructions that cause at least one processor to: train a neural network (NN); use the trained NN to create a dictionary vector for each of a plurality of dictionary words; store each dictionary vector with a classification indicator corresponding to the associated dictionary word; use the trained NN to create a word vector for each word in the batch of words for classification; find a closest matching dictionary vector for each word vector; and report a classification indicator of the closest matching dictionary vector for each word vector in the batch.
[0048] Training the NN may include calculating a similarity metric for a plurality of pairs of a plurality of training words (the similarity metric is equal to one less the Levenshtein edit distance divided by the length of the longest word in the pair); using the NN and the twin of the NN to create a pair of training vectors for each of the plurality of pairs of training words; calculating a cosine similarity between the training vectors of each pair; comparing the similarity metric and the cosine similarity for each pair of training words; and adjusting the NN based on the comparison.
[0049] The following examples provide further embodiments of the present technology. Example Example 1 1. A system for classifying words in a batch of words, comprising: at least one memory device, creating a dictionary vector for each of a plurality of dictionary words using a neural network (NN); storing each dictionary vector with a classification indicator corresponding to said associated dictionary word; using the NN to create a word vector for each word in a batch of words for classification; finding one or more closest matching dictionary vectors for each word vector; reporting the classification indicator of the one or more closest matching dictionary vectors for each word vector in the batch; the at least one memory device storing instructions that cause at least one processor to perform A system including: Example 2 2. The system of example 1, wherein the dictionary words and the words in the batch are encoded into a 30 character by 50 length matrix. Example 3 3. The system of claim 1 or 2, wherein the NN is a convolutional neural network. Example 4 4. The system of any one of embodiments 1-3, wherein each word vector is created without storing the corresponding word in the batch. Example 5 5. The system of any one of examples 1-4, wherein each dictionary vector and corresponding classification indicator is indexed to facilitate similarity searching. Example 6 Each of the one or more closest matching dictionary vectors has an associated score, and the step of reporting the classification indicator of the one or more closest matching dictionary vectors for each word vector in the batch comprises: selecting the highest score for each classification indicator for each word in the batch; averaging the selected best scores for each classification indicator; Including, The system according to any one of the first to fifth embodiments. Example 7 training the NN, calculating a similarity metric for a plurality of pairs of a plurality of training words; generating a pair of training vectors for each of the plurality of pairs of training words using the NN and a twin of the NN; calculating the cosine similarity between each pair of training vectors; comparing the similarity metric and the cosine similarity for each pair of training words and adjusting the NN based on the comparison; and further comprising the step of training the NN, The system according to any one of the first to sixth embodiments. Example 8 8. The system of example 7, wherein the training words include the dictionary words. Example 9 9. The system of example 7 or 8, wherein the similarity metric is equal to one less the Levenshtein edit distance divided by the length of the longest word in the pair. Example 10 10. The system of any one of Examples 7 to 9, wherein the cosine similarity is calculated by dividing the dot product of the pair of training vectors by the product of their Euclidean norms. Example 11 1. A system for classifying words in a batch of words, comprising: at least one memory device, training a convolutional neural network (CNN), encoding each of a plurality of training words into a matrix form; calculating a similarity metric for a plurality of pairs of the plurality of training words; generating a pair of training vectors for each pair of encoded training words corresponding to the plurality of pairs using the CNN and a twin of the CNN; calculating the cosine similarity between each pair of training vectors; comparing the similarity metric and the cosine similarity for each pair of training words and adjusting the CNN based on the comparison; storing the trained CNN; training the CNN, encoding each of a plurality of dictionary words into a matrix format; creating a dictionary vector for each of the plurality of encoded dictionary words using the trained CNN; storing each dictionary vector with a classification indicator corresponding to said associated dictionary word; encoding each word in the batch of words into a matrix form for classification; using the trained CNN to create a word vector for each encoded word in the batch; finding one or more closest matching dictionary vectors for each word vector; reporting the classification indicator of the one or more closest matching dictionary vectors for each word vector in the batch; the at least one memory device storing instructions that cause at least one processor to perform A system including: Example 12 12. The system of example 11, wherein the training words include the dictionary words. Example 13 13. The system of example 11 or example 12, wherein the similarity metric is equal to one less the Levenshtein edit distance divided by the length of the longest word in the pair. Example 14 14. The system of any one of Examples 11 to 13, wherein the cosine similarity is calculated by dividing the dot product of the pair of training vectors by the product of their Euclidean norms. Example 15 15. The system of any one of Examples 11-14, wherein the training words, the dictionary words, and the words in the batch are encoded into a matrix of length 30 characters by length 50. Example 16 16. The system of any one of examples 11-15, wherein each word vector is created without storing the corresponding word in the batch. Example 17 17. The system of any one of Examples 11-16, wherein each dictionary vector and corresponding classification indicator is indexed to facilitate similarity searching. Example 18 Each of the one or more closest matching dictionary vectors has an associated score, and the step of reporting the classification indicator of the one or more closest matching dictionary vectors for each word vector in the batch comprises: selecting the highest score for each classification indicator for each word in the batch; averaging the selected best scores for each classification indicator; Including, The system according to any one of Examples 11 to 17. Example 19 1. A system for classifying words in a batch of words, comprising: at least one memory device, training a neural network (NN), calculating a similarity metric for a plurality of pairs of a plurality of training words, the similarity metric being equal to one less the Levenshtein edit distance divided by the length of the longest word in the pair; generating a pair of training vectors for each of the plurality of pairs of training words using the NN and a twin of the NN; calculating the cosine similarity between each pair of training vectors; comparing the similarity metric and the cosine similarity for each pair of training words and adjusting the NN based on the comparison; the step of training the NN, using the trained NN to create a dictionary vector for each of a plurality of dictionary words; storing each dictionary vector with a classification indicator corresponding to said associated dictionary word; using the trained NN to create a word vector for each word in the batch of words for classification; finding one or more closest matching dictionary vectors for each word vector; reporting the classification indicator of the one or more closest matching dictionary vectors for each word vector in the batch; the at least one memory device storing instructions that cause at least one processor to perform A system including: Example 20 20. The system of example 19, wherein the cosine similarity is calculated by dividing the dot product of the pair of training vectors by the product of their Euclidean norms. Example 21 Each of the one or more closest matching dictionary vectors has an associated score, and the step of reporting the classification indicator of the one or more closest matching dictionary vectors for each word vector in the batch comprises: selecting the highest score for each classification indicator for each word in the batch; averaging the selected best scores for each classification indicator; Including, 21. The system of Example 19 or 20. Example 22 22. The system of any one of Examples 19 to 21, wherein the training words, the dictionary words, and the words in the batch are encoded into a 30 character by 50 length matrix, and then corresponding vectors are created by the NN. Example 23 23. The system of any one of Examples 19 to 22, wherein the NN is a convolutional neural network. Example 24 25. The system of any one of examples 19-24, wherein each word vector is created without storing the corresponding word in the batch. Example 25 25. The system of any one of Examples 19 to 24, wherein each dictionary vector and corresponding classification indicator is indexed to facilitate similarity searching. Example 26 26. The system of any one of Examples 19-25, wherein the training words include the dictionary words. Note
[0050] The above description and drawings are illustrative and should not be construed as limiting. Numerous specific details have been set forth to provide a thorough understanding of the present disclosure. However, in some instances, well-known details have been omitted to avoid obscuring the description. Furthermore, various modifications may be made without departing from the scope of these embodiments.
[0051] References herein to "one embodiment" or "an embodiment" mean that a particular feature, structure, or characteristic described with respect to that embodiment is included in at least one embodiment of the present disclosure. The appearances of the phrase "in one embodiment" in various places throughout this specification do not necessarily all refer to the same embodiment, nor do they refer to separate or alternative embodiments that are mutually exclusive with respect to other embodiments. Moreover, various features described may be exhibited by some embodiments and not by other embodiments. Similarly, various requirements described may be requirements for some embodiments and not for other embodiments.
[0052] The terms used herein generally have their ordinary meanings in the art, within the context of this disclosure, and in the specific context in which each term is used. It should be understood that the same thing may be said in more than one way. Thus, alternative phrases or synonyms may be used for any one or more of the terms described herein, and no special meaning is ascribed to the term, regardless of whether it is recited or discussed herein. Synonyms have been provided for some terms. The statement of one or more synonyms does not exclude the use of other synonyms. The use of examples anywhere in this specification, including examples of any terms described herein, is merely illustrative and is not intended to further limit the scope and meaning of the present disclosure or of any exemplary term. Similarly, this disclosure is not limited to the various embodiments provided herein. Unless otherwise defined, the meaning of all technical and scientific terms used herein is the same as commonly understood by one of ordinary skill in the art to which this disclosure belongs. In case of conflict, the present document, including definitions, controls.
Claims
1. 1. A system for classifying words in a batch of words, comprising: At least one memory device, creating a dictionary vector for each of a plurality of dictionary words using a neural network (NN); storing each dictionary vector with a classification indicator corresponding to said associated dictionary word; using the neural network to create a word vector for each word in a batch of words for classification; finding one or more closest matching dictionary vectors for each word vector; reporting the classification indicators of the one or more closest matching dictionary vectors for each word vector in the batch; said at least one memory device storing instructions for causing at least one processor to carry out A system including:
2. The system of claim 1 , wherein the dictionary words and the words in the batch are encoded into a matrix of length 30 characters by length 50.
3. The system of claim 1 , wherein the NN is a convolutional neural network.
4. The system of claim 1 , wherein each word vector is created without storing the corresponding word in the batch.
5. The system of claim 1 , wherein each dictionary vector and corresponding classification indicator is indexed to facilitate similarity searching.
6. Each of the one or more closest matching dictionary vectors has an associated score, and the step of reporting the classification indicator of the one or more closest matching dictionary vectors for each word vector in the batch comprises: selecting, for each word in the batch, the highest score for each classification indicator; averaging the selected best scores for each classification indicator; Including, The system of claim 1 .
7. Training the neural network, calculating a similarity metric for a plurality of pairs of a plurality of training words; generating a pair of training vectors for each of said plurality of pairs of training words using said NN and a twin of said NN; calculating the cosine similarity between each pair of training vectors; comparing the similarity metric and the cosine similarity for each pair of training words and adjusting the NN based on the comparison; training the NN, The system of claim 1 .
8. The system of claim 7 , wherein the training words include the dictionary words.
9. 8. The system of claim 7, wherein the similarity metric is equal to one less the Levenshtein edit distance divided by the length of the longest word in the pair.
10. The system of claim 7 , wherein the cosine similarity is calculated by dividing the dot product of the pair of training vectors by the product of their Euclidean norms.
11. 1. A system for classifying words in a batch of words, comprising: At least one memory device, Training a convolutional neural network (CNN), encoding each of a plurality of training words into a matrix form; calculating a similarity metric for a plurality of pairs of the plurality of training words; creating a pair of training vectors for each pair of encoded training words corresponding to the plurality of pairs using the CNN and a twin of the CNN; calculating the cosine similarity between each pair of training vectors; comparing the similarity metric and the cosine similarity for each pair of training words and adjusting the CNN based on the comparison; storing the trained CNN; training the CNN, encoding each of a plurality of dictionary words into a matrix form; creating a dictionary vector for each of the plurality of encoded dictionary words using the trained CNN; storing each dictionary vector with a classification indicator corresponding to said associated dictionary word; encoding each word in the batch of words into a matrix form for classification; using the trained CNN to create a word vector for each encoded word in the batch; finding one or more closest matching dictionary vectors for each word vector; reporting the classification indicators of the one or more closest matching dictionary vectors for each word vector in the batch; said at least one memory device storing instructions for causing at least one processor to carry out A system including:
12. The system of claim 11 , wherein the training words include the dictionary words.
13. 12. The system of claim 11, wherein the similarity metric is equal to one less the Levenshtein edit distance divided by the length of the longest word in the pair.
14. The system of claim 11 , wherein the cosine similarity is calculated by dividing the dot product of the pair of training vectors by the product of their Euclidean norms.
15. The method of claim 1, wherein each of the one or more closest matching dictionary vectors has an associated score, and the step of reporting the classification indicator of the one or more closest matching dictionary vectors for each word vector in the batch comprises: selecting, for each word in the batch, the highest score for each classification indicator; averaging the selected best scores for each classification indicator; Including, The system of claim 11.
