# US 2015/0149151 A1 · Procedure for building a max-arpa table in order to compute optimistic back-offs in a language model

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

- Number: US 2015/0149151 A1
- Document ID: US20150149151A1
- Status: Published application
- Kind: A1
- Application number: 14/089,935
- Filed: 2013-11-26
- Published: 2015-05-28
- Earliest claimed: 2013-11-26
- Assignees: Xerox Corporation
- Applicants: Xerox Corporation
- Inventors: Marc Dymetman
- Web page: https://patentgrep.com/patent/US20150149151A1

## CPC

- G06F 40/20: Natural language analysis (semantic analysis of natural language G06F40/30)
- G06F 40/40: Processing or translation of natural language (natural language analysis G06F40/20; semantic analysis G06F40/30)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Each entry of an ARPA table for a modeled language includes an n-gram Az, an associated backoff value Az.p equal to the conditional probability p(z|A) that symbol z follows context A in the modeled language, and an associated backoff weight value Az.b for the context A. A method comprises: (1) computing and adding for each entry of the ARPA table in descending n-gram order an associated maximum backoff weight product value Az.m; (2) after performing operation (1), computing and adding for each entry of the ARPA table in descending n-gram order an associated max-backoff value Az.w=maxh p(z|hA) which is the maximum backoff value for any head h preceding the context A of the n-gram Az; and (3) extending the ARPA table by adding a column storing the associated maximum backoff weight product values Az.m and a column storing the associated max-backoff values Az.w.

## Claims

### Claim 1

A non-transitory storage medium storing instructions readable and executable by an electronic data processing device to perform a method operating on an ARPA table for a modeled language in which each entry of the ARPA table includes an n-gram Az, an associated backoff value Az.p equal to the conditional probability p(z|A) that symbol z follows context A in the modeled language, and an associated backoff weight value Az.b for the context A, the method comprising:
computing a max-ARPA table from the ARPA table by operations including:
computing and adding for each entry of the ARPA table an associated maximum backoff weight product value Az.m wherein the computing and adding of the associated maximum backoff weight product values is performed on the entries of the ARPA table in descending n-gram order; and
after computing and adding the associated maximum backoff weight product values, computing and adding for each entry of the ARPA table an associated max-backoff value Az.w=w(A,z) where w(A,z)=maxh p(z|hA) is the maximum backoff value for any head h preceding the context A of the n-gram Az and the computing and adding of the associated max-backoff values is performed on the entries of the ARPA table in descending n-gram order;
wherein each entry of the max-ARPA table includes an n-gram Az and its associated backoff value Az.p, backoff weight value Az.b, maximum backoff weight product value Az.m, and max-backoff value Az.w.

### Claim 2 (depends on 1)

The non-transitory storage medium as set forth in claim 1 wherein:
the computing of the max-ARPA table includes the further operation of sorting the entries of the ARPA table in descending n-gram order prior to computing and adding the maximum backoff weight product values Az.m;
the computing and adding of the associated maximum backoff weight product values Az.m is performed from top-to-bottom on the sorted ARPA table whereby the computing and adding of the associated maximum backoff weight product values is performed on the entries of the ARPA table in descending n-gram order; and
the computing and adding of the associated max-backoff values Az.w is performed from top-to-bottom on the sorted ARPA table whereby the computing and adding of the associated max-backoff values is performed on the entries of the ARPA table in descending n-gram order.

### Claim 3 (depends on 2)

The non-transitory storage medium as set forth in claim 2 wherein the operation of computing and adding for each entry of the sorted ARPA table an associated maximum backoff weight product value A.m comprises performing the algorithm:
For A in Tsorted
A.m ← 1
For x in V s.t.xA in Tsorted:
A.m ← max(A.m, xA.b × xA.m)
where Tsorted is the sorted ARPA table, the algorithm is performed from top-to-bottom of the sorted ARPA table Tsorted, and V is the vocabulary of the modeled language, and the maximum backoff weight product value for entry A is the value A.m computed by performing the algorithm.

### Claim 4 (depends on 3)

The non-transitory storage medium as set forth in claim 3 wherein the operation of computing and adding for each entry Az of the sorted ARPA table an associated max-backoff value Az.w comprises performing the algorithm:
For Az in Tsorted
Az.w ← Az.p
For x in V s.t.xA in Tsorted:
If xAz in Tsorted:
Az.w ← max(Az.w,xAz.w)
Else
Az.w ← max(Az.w,Az.p × xA.b × xA.m)
from top-to-bottom of the sorted ARPA table.

### Claim 5 (depends on 1)

The non-transitory storage medium as set forth in claim 1 wherein the method further comprises:
computing a max-backoff value w(A,z) for an n-gram Az that is not in the ARPA table by applying the recursive equation:
w

(
A
,
z
)
=
{
p

(
A
,
z
)
if


Az
∉
T
m


A


and


A
∉
T
m


A
p

(
A
,
z
)
×
A
·
m
if


Az
∉
T
m


A


and


A
∈
T
m


A
Az
·
w
if


Az
∈
T
m


A
where the values A.m and Az.w are obtained from the .m and .w columns of the max-ARPA table TmA, respectively, and p(A,z) is computed from the .p and .b columns of the max-ARPA table.

### Claim 6 (depends on 5)

The non-transitory storage medium as set forth in claim 5 wherein the method further comprises:
computing the backoff value p(z|A) for an n-gram Az that is not in the ARPA table by applying the recursive equation:
p

(
A
,
z
)
=
{
p

(
tail

(
A
)
,
z
)
if


Az
∉
T
m


A


and


A
∉
T
m


A
p

(
tail

(
A
)
,
z
)
×
A
·
b
if


Az
∉
T
m


A


and


A
∈
T
m


A
Az
·
p
if


Az
∈
T
m


A
where tail(A) denotes the string A with its first element removed and the values A.b and Az.p are obtained from the .b and .p columns of the max-ARPA table, respectively.

### Claim 7

A method operating on an ARPA table for a modeled language in which each entry of the ARPA table includes an n-gram Az, an associated backoff value Az.p equal to the conditional probability p(z|A) that symbol z follows context A in the modeled language, and an associated backoff weight value Az.b for the context A, the method comprising:
computing a max-ARPA table from the ARPA table by using an electronic data processing device to perform the operations of:
sorting the entries of the ARPA table in descending n-gram order to generate a sorted ARPA table;
(1) after the sorting, computing and adding for each entry from top-to-bottom of the sorted ARPA table an associated maximum backoff weight product value Az.m; and
(2) after performing operation (1), computing and adding for each entry from top-to-bottom of the sorted ARPA table an associated max-backoff value Az.w where Az.w=maxh p(z|hA) is the maximum backoff value for any head h preceding the context A of the n-gram Az;
wherein each entry of the max-ARPA table includes an n-gram Az and its associated backoff value Az.p, backoff weight value Az.b, maximum backoff weight product value Az.m, and max-backoff value Az.w.

### Claim 8 (depends on 7)

The method of claim 7 wherein performing operation (1) comprises performing the algorithm:
For A in Tsorted
A.m ← 1
For x in V s.t.xA in Tsorted:
A.m ← max(A.m,xA.b × xA.m)
where Tsorted is the sorted ARPA table, the algorithm is performed from top-to-bottom of the sorted ARPA table Tsorted, and V is the vocabulary of the modeled language, and the maximum backoff weight product value for entry A is assigned the value A.m computed by performing the algorithm.

### Claim 9 (depends on 8)

The method of claim 8 wherein performing operation (2) comprises performing the algorithm:
For Az in Tsorted
Az.w ← Az.p
For x in V s.t.xA in Tsorted:
If xAz in Tsorted:
Az.w ← max(Az.w,xAz.w)
Else
Az.w ← max(Az.w,Az.p × xA.b × xA.m)
from top-to-bottom of the sorted ARPA table Tsorted.

### Claim 10 (depends on 7)

The method of claim 7 further comprising:
computing a max-backoff value w(A,z) for an n-gram Az that is not in the ARPA table by applying the recursive equation:
w

(
A
,
z
)
=
{
p

(
A
,
z
)
if


Az
∉
T
m


A


and


A
∉
T
m


A
p

(
A
,
z
)
×
A
·
m
if


Az
∉
T
m


A


and


A
∈
T
m


A
Az
·
w
if


Az
∈
T
m


A
where the values A.m and Az.w are obtained from the .m and .w columns of the max-ARPA table TmA, respectively, and p(A,z) is computed from the .p and .b columns of the max-ARPA table, and the computing of the max-backoff value w(A,z) is performed by the electronic data processing device.

### Claim 11 (depends on 10)

The method of claim 10 further comprising:
computing the backoff value p(z|A) for an n-gram Az that is not in the ARPA table by applying the recursive equation:
p

(
A
,
z
)
=
{
p

(
tail

(
A
)
,
z
)
if


Az
∉
T
m


A


and


A
∉
T
m


A
p

(
tail

(
A
)
,
z
)
×
A
·
b
if


Az
∉
T
m


A


and


A
∈
T
m


A
Az
·
p
if


Az
∈
T
m


A
where tail(A) denotes the string A with its first element removed and the values A.b and Az.p are obtained from the .b and .p columns of the max-ARPA table, respectively, and wherein the computing of the backoff value p(z|A) is performed by the electronic data processing device.

### Claim 12 (depends on 10)

The method of claim 10 further comprising:
sampling a language model represented by the ARPA table by generating an upper bound on the language model and then sequentially refining the upper bound during the sampling process using the computed max-backoff value w(A,z).

### Claim 13

An apparatus comprising:
an electronic data processing device programmed to perform a method operating on an ARPA table for a modeled language in which each entry of the ARPA table includes an n-gram Az, an associated backoff value Az.p equal to the conditional probability p(z|A) that symbol z follows context A in the modeled language, and an associated backoff weight value Az.b for the context A, the method comprising:
(1) computing and adding for each entry of the ARPA table in descending n-gram order an associated maximum backoff weight product value Az.m;
(2) after performing operation (1), computing and adding for each entry of the ARPA table in descending n-gram order an associated max-backoff value Az.w=maxh p(z|hA) which is the maximum backoff value for any head h preceding the context A of the n-gram Az; and
(3) extending the ARPA table by adding a column storing the associated maximum backoff weight product values Az.m and a column storing the associated max-backoff values Az.w.

### Claim 14 (depends on 13)

The apparatus of claim 13 wherein the method further comprises:
(0) sorting the entries of the ARPA table in descending n-gram order to generate a sorted ARPA table;
wherein each of operation (1) and operation (2) is performed on the sorted ARPA table from top-to-bottom.

### Claim 15 (depends on 14)

The apparatus of claim 14 wherein operation (1) comprises performing the algorithm:
For A in Tsorted
A.m ← 1
For x in V s.t.xA in Tsorted:
A.m ← max(A.m,xA.b × xA.m)
wherein the algorithm is performed from top-to-bottom on the sorted ARPA table Tsorted, V is the vocabulary of the modeled language, and the maximum backoff weight product value for entry Az is assigned the value Az.m computed by performing the algorithm.

### Claim 16 (depends on 15)

The apparatus of claim 15 wherein operation (2) comprises performing the algorithm:
For Az in Tsorted
Az.w ← Az.p
For x in V s.t.xA in Tsorted:
If xAz in Tsorted:
Az.w ← max(Az.w,xAz.w)
Else
Az.w ← max(Az.w,Az.p × xA.b × xA.m)
from top-to-bottom on the sorted ARPA table Tsorted.

### Claim 17 (depends on 13)

The apparatus of claim 13 wherein the method performed by the electronic data processing device further comprises:
(4) computing a max-backoff value w(A,z) for an n-gram Az that is not in the ARPA table by applying the recursive equation:
w

(
A
,
z
)
=
{
p

(
A
,
z
)
×
A
·
m
if


Az
∉
T
Az
·
w
if


Az
∈
T
where T denotes the extended ARPA table, Az.w is obtained from the Az.w column added to the ARPA table, A.m is obtained from the .m column added to the ARPA table if listed and is assigned a default value otherwise, and p(A,z) is computed from the .p and .b columns of the ARPA table.

### Claim 18 (depends on 17)

The apparatus of claim 17 further comprising:
sampling a language model represented by the ARPA table by generating an upper bound on the language model and then sequentially refining the upper bound during the sampling process using max-backoff values w(A,z) computed using the operation (4).
