Wolfram Language
Paclet Repository
Community-contributed installable additions to the Wolfram Language
Primary Navigation
Categories
Cloud & Deployment
Core Language & Structure
Data Manipulation & Analysis
Engineering Data & Computation
External Interfaces & Connections
Financial Data & Computation
Geographic Data & Computation
Geometry
Graphs & Networks
Higher Mathematical Computation
Images
Knowledge Representation & Natural Language
Machine Learning
Notebook Documents & Presentation
Scientific and Medical Data & Computation
Social, Cultural & Linguistic Data
Strings & Text
Symbolic & Numeric Computation
System Operation & Setup
Time-Related Computation
User Interface Construction
Visualization & Graphics
Random Paclet
Alphabetical List
Using Paclets
Create a Paclet
Get Started
Download Definition Notebook
Learn More about
Wolfram Language
TriesWithFrequencies
Guides
Tries with frequencies
Tech Notes
English words infixes study
Using Tries for Markov chain text generation
Symbols
ToTrieFromJSON
ToTrieWithRoot
TrieBlank
TrieBodyQ
TrieClassify
TrieComparisonGrid
TrieContains
TrieCreateBySplit
TrieCreate
TrieDepth
TrieForm
TrieGetWords
TrieHasCompleteMatchQ
TrieInsert
TrieKeyExistsQ
TrieKeyQ
TrieKeyTraverse
TrieKeyValueTraverse
TrieLeafProbabilities
TrieLeafProbabilitiesWithPositions
TrieMap
TrieMemberQ
TrieMerge
TrieNodeCounts
TrieNodeFrequencies
TrieNodeProbabilities
TrieParetoFractionRemove
TriePathFromPosition
TriePosition
TriePrune
TrieQ
TrieRandomChoice
TrieRemove
TrieRetrieve
TrieRootToLeafPathProbabilityRules
TrieRootToLeafPathRules
TrieRootToLeafPaths
TrieRuleQ
TrieShrink
TrieSubTrie
TrieThresholdRemove
TrieToJSON
TrieToListTrie
TrieToRules
TrieValueRuleQ
TrieValueTotal
TrieWithTrieRootQ
$TrieRoot
$TrieValue
AntonAntonov`TriesWithFrequencies`
T
r
i
e
M
e
r
g
e
T
r
i
e
M
e
r
g
e
[
t
1
_
,
t
2
_
]
m
e
r
g
e
s
t
w
o
t
r
i
e
s
.
Examples
(
1
)
Basic Examples
(
1
)
Here are five dictionary words:
I
n
[
1
]
:
=
w
o
r
d
s
1
=
{
"
k
r
o
n
a
"
,
"
k
r
o
n
e
"
,
"
k
r
o
n
e
r
"
,
"
k
r
o
n
o
r
"
,
"
k
r
o
n
u
r
"
}
Here is a trie for the words above:
I
n
[
2
]
:
=
t
r
1
=
T
r
i
e
C
r
e
a
t
e
B
y
S
p
l
i
t
[
w
o
r
d
s
1
]
;
T
r
i
e
F
o
r
m
[
t
r
1
]
O
u
t
[
2
]
=
Here is another list of four dictionary words:
I
n
[
3
]
:
=
w
o
r
d
s
2
=
{
"
k
r
a
a
l
"
,
"
k
r
a
a
l
s
"
,
"
k
r
i
l
l
"
,
"
k
r
y
p
t
o
n
"
}
O
u
t
[
3
]
=
{
k
r
a
a
l
,
k
r
a
a
l
s
,
k
r
i
l
l
,
k
r
y
p
t
o
n
}
Here is a trie for the words above:
I
n
[
4
]
:
=
t
r
2
=
T
r
i
e
C
r
e
a
t
e
B
y
S
p
l
i
t
[
w
o
r
d
s
2
]
;
T
r
i
e
F
o
r
m
[
t
r
2
]
O
u
t
[
4
]
=
Here the two tries are merged:
I
n
[
5
]
:
=
t
r
3
=
T
r
i
e
M
e
r
g
e
[
t
r
1
,
t
r
2
]
;
T
r
i
e
F
o
r
m
[
t
r
3
,
I
m
a
g
e
S
i
z
e
M
e
d
i
u
m
]
O
u
t
[
5
]
=
Contents cannot be rendered at this time; please try again later
Here are the shrunk versions of all three tries:
I
n
[
6
]
:
=
T
r
i
e
C
o
m
p
a
r
i
s
o
n
G
r
i
d
T
r
i
e
S
h
r
i
n
k
[
t
r
1
]
,
T
r
i
e
S
h
r
i
n
k
[
t
r
2
]
,
T
r
i
e
S
h
r
i
n
k
[
t
r
3
]
,
I
m
a
g
e
S
i
z
e
2
0
0
O
u
t
[
6
]
=
T
r
i
e
S
h
r
i
n
k
[
t
r
1
]
T
r
i
e
S
h
r
i
n
k
[
t
r
2
]
T
r
i
e
S
h
r
i
n
k
[
t
r
3
]
Contents cannot be rendered at this time; please try again later
Contents cannot be rendered at this time; please try again later
Contents cannot be rendered at this time; please try again later
S
e
e
A
l
s
o
T
r
i
e
C
r
e
a
t
e
▪
T
r
i
e
C
r
e
a
t
e
B
y
S
p
l
i
t
▪
T
r
i
e
M
e
r
g
e
▪
T
r
i
e
S
h
r
i
n
k
▪
T
r
i
e
C
o
m
p
a
r
i
s
o
n
G
r
i
d
R
e
l
a
t
e
d
G
u
i
d
e
s
▪
T
r
i
e
s
w
i
t
h
f
r
e
q
u
e
n
c
i
e
s
"
"