# US 2022/0284190 A1 · Tokenizing alphanumeric text through use of finite state machines

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2022/0284190 A1
- Document ID: US20220284190A1
- Status: Published application
- Kind: A1
- Application number: 17/190,344
- Filed: 2021-03-02
- Published: 2022-09-08
- Earliest claimed: 2021-03-02
- Assignees: Microsoft Technology Licensing, LLC
- Applicants: Microsoft Technology Licensing, LLC
- Inventors: Siarhei ALONICHAU; Junaid AHMED
- Web page: https://patentgrep.com/patent/US20220284190A1

## CPC

- G06F 40/284: Lexical analysis, e.g. tokenisation or collocates
- G06F 40/216: using statistical methods
- G06F 40/30: Semantic analysis
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Described herein are technologies related to tokenizing alphanumeric text through use of a tokenization algorithm that is at least partially implemented as a finite state machine. The tokenization algorithm is configured to output numeric identifiers that represent tokens or sub-tokens in the alphanumeric text.

## Claims

### Claim 1

A computing system comprising:
a processor; and
memory storing instructions that, when executed by the processor, cause the processor to perform acts comprising:
receiving a request to tokenize alphanumeric text that includes a word; and
tokenizing the alphanumeric text such that a sequence of numeric identifiers that represents the alphanumeric text is output, wherein tokenizing the alphanumeric text comprises:
providing the alphanumeric text to a computer-implemented finite state machine, where the finite state machine includes a final state; and
outputting at least one numeric identifier as a representation of the word based upon a value assigned to the final state of the computer-implemented finite state machine,
wherein the at least one numeric identifier is identified from a predefined set of numeric identifiers, and further wherein a class is assigned to the alphanumeric text by a computer-implemented text classifier based upon the output sequence of numeric identifiers.

### Claim 2 (depends on 1)

The computing system of claim 1, wherein the finite state machine outputs numerous numeric identifiers as the representation of the word in the alphanumeric text.

### Claim 3 (depends on 1)

The computing system of claim 1, wherein the finite state machine is a Moore machine.

### Claim 4 (depends on 1)

The computing system of claim 1, wherein the finite state machine is a Mealy machine.

### Claim 5 (depends on 1)

The computing system of claim 1, wherein tokenizing the alphanumeric text comprises generating the sequence of numeric identifiers based upon a score previously assigned to a token included in the word.

### Claim 6 (depends on 5)

The computing system of claim 5, wherein the score is indicative of a likelihood of the token being included in an arbitrary block of text.

### Claim 7 (depends on 5)

The computing system of claim 5, wherein the score is indicative of a rank of the token relative to other tokens in a predefined vocabulary.

### Claim 8 (depends on 1)

The computing system of claim 1, wherein the request includes an indication that the computer-implemented text classifier is to assign the class to the alphanumeric text, wherein tokenizing is performed by a tokenizer, the acts further comprising:
selecting the tokenizer from amongst a plurality of available tokenizers based upon the indication in the request; and
upon selecting the tokenizer, providing the alphanumeric text to the tokenizer.

### Claim 9 (depends on 1)

The computing system of claim 1, wherein the finite state machine is a minimal deterministic finite state machine.

### Claim 10 (depends on 1)

The computing system of claim 1, wherein tokenizing the alphanumeric text comprises:
identifying several different possible sequences of tokens in the alphanumeric text; and
identifying a sequence of tokens from amongst the different possible sequences of tokens based upon predefined scores assigned to the tokens, wherein the sequence of numeric identifiers represents the sequence of tokens.

### Claim 11

A method performed by a computing system that includes at least one processor, the method comprising:
receiving:
alphanumeric text; and
a request to tokenize the alphanumeric text; and
based upon the alphanumeric text and further based upon the request, tokenizing the alphanumeric text such that a sequence of numeric identifiers is output, wherein the sequence of numeric identifiers represents the alphanumeric text, wherein tokenizing the alphanumeric text comprises:
providing the alphanumeric text to a computer-implemented finite state machine, wherein the finite state machine comprises several states and transitions between states, and further wherein a state in the several states is labeled as an output state; and
traversing several transitions to reach the output state, a numeric identifier is output based upon a value assigned to the output state,
wherein the alphanumeric text is assigned to a class by a text classifier based upon the sequence of numeric identifiers.

### Claim 12 (depends on 11)

The method of claim 11, wherein each numeric identifier in the sequence of numeric identifiers is an integer from amongst a predefined set of integers.

### Claim 13 (depends on 11)

The method of claim 11, wherein the finite state machine is a minimal deterministic finite state machine.

### Claim 14 (depends on 11)

The method of claim 11, wherein the finite state machine is a Moore machine.

### Claim 15 (depends on 11)

The method of claim 11, wherein the finite state machine is a Mealy machine.

### Claim 16 (depends on 11)

The method of claim 11, further comprising:
upon tokenizing the alphanumeric text, using embedding technologies to transform the sequence of numeric identifiers into a sequence of vectors, wherein the alphanumeric text is assigned to the class by the text classifier based upon the sequence of vectors.

### Claim 17 (depends on 11)

The method of claim 11, wherein the request to tokenize the alphanumeric text includes an identity of the text classifier, the method further comprising:
selecting a tokenizer from amongst a plurality of potential tokenizers based upon the identity of the text classifier included in the request, wherein the tokenizer includes the finite state machine.

### Claim 18 (depends on 11)

The method of claim 11, wherein tokens in the alphanumeric text have respective predefined scores assigned thereto, and further wherein the sequence of numeric identifiers is output based upon the predefined scores respectively assigned to the tokens.

### Claim 19 (depends on 18)

The method of claim 18, wherein the predefined scores are indicative of frequency of occurrence of the respective tokens in a set of training data used to train a tokenizer that performs the tokenizing of the alphanumeric text.

### Claim 20

A computer-readable storage medium comprising instructions that, when executed by a processor, cause the processor to perform acts comprising:
receiving a request to tokenize alphanumeric text using a tokenization algorithm that belongs to a Word Piece class of tokenization algorithms; and
based upon the request, tokenizing the alphanumeric text using the tokenization algorithm to output a sequence of numeric identifiers, wherein the tokenization algorithm is at least partially implemented as a deterministic finite state machine, and further wherein tokenizing the alphanumeric text comprises:
providing the alphanumeric text as input to the deterministic finite state machine; and
outputting a numeric identifier that is representative of a token in the alphanumeric text based upon a value assigned to a final state of the deterministic finite state machine,
wherein the alphanumeric text is assigned a class by a computer-implemented text classifier based upon the sequence of numeric identifiers.
