notes:internals:trie
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
notes:internals:trie [2025/09/07 01:15] – smj-edison | notes:internals:trie [2025/09/07 01:51] (current) – smj-edison | ||
---|---|---|---|
Line 1: | Line 1: | ||
===== The Trie ===== | ===== The Trie ===== | ||
A Trie is the data structure that underlies Folk's database. It is the database' | A Trie is the data structure that underlies Folk's database. It is the database' | ||
+ | Let's look at an example Statement with the Clause "the sky is blue". | ||
- | Let's insert | + | Let's insert |
{{notes: | {{notes: | ||
Line 11: | Line 12: | ||
{{notes: | {{notes: | ||
- | As seen, a Trie is just a tree, with each successive Term placed one level deeper in the tree†. | + | As seen, a Trie is just a tree, with each successive Term placed one level deeper in the tree*. |
We've now covered inserting, but what about querying? Let's try querying | We've now covered inserting, but what about querying? Let's try querying | ||
Line 40: | Line 41: | ||
=== Footnotes === | === Footnotes === | ||
- | * This is a little misleading, as the Trie can have Terms with spaces in them. For example, | + | * Technically, |
- | the last Term in `Wish $this has name "Mason Jones" | + | |
- | space seperated by default, and all the Trie commands run in tcl. | + | |
- | + | ||
- | † Technically, | + | |
not for each word. It makes more sense to be for each word in Folk though. | not for each word. It makes more sense to be for each word in Folk though. | ||
notes/internals/trie.1757207710.txt.gz · Last modified: by smj-edison