You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
Thanks for the great writeup and highly functional DAWG.
I wonder if there is a way to infer (?) a unique numeric identity at serialization. For example, is there some value to grab (a numeric representation of path to node as id sequence?) that I could treat as a unique numeric identifier for that string? My goal is to know some unique value that persists both to and from serialization so that I can map a word value to a related data item.
When I ran the File_TapTopTapsTops test, which specifies four entries for the dawg:
var dawg = Dawg.CreateBuilder(new[] {"tap", "top", "taps", "tops"}) .Build();
I expected I would hit the debug breakpoint I put on the modified version of WriteLists in DawgBuilder 4 times, but only hit it twice. I expect that's because I have the wrong mental model of the encoding.
But what I was hoping for was to find some form of "per word numeric identity" in the graph, lurking at the moment of serialization.
` void WriteLists(Queue pending, LongestListsPerHash longest, IDawgStateWriter writer)
{
while (pending. Count > 0)
{
var current = pending. Dequeue();
writer.MoveToNode(current.NodeIndex);
writer.IsLastSibling = current.IsLastSibling;
writer.SymbolId = current.SymbolId;
writer.IsEndOfWord = current.IsTerminal;
if (current.IsTerminal)
{
var test = pending.ToString();
}`
Any suggestions or help appreciated. I'm going back to reread. Thanks again.! :)
The text was updated successfully, but these errors were encountered:
Hi,
Thanks for the great writeup and highly functional DAWG.
I wonder if there is a way to infer (?) a unique numeric identity at serialization. For example, is there some value to grab (a numeric representation of path to node as id sequence?) that I could treat as a unique numeric identifier for that string? My goal is to know some unique value that persists both to and from serialization so that I can map a word value to a related data item.
When I ran the File_TapTopTapsTops test, which specifies four entries for the dawg:
var dawg = Dawg.CreateBuilder(new[] {"tap", "top", "taps", "tops"}) .Build();
I expected I would hit the debug breakpoint I put on the modified version of WriteLists in DawgBuilder 4 times, but only hit it twice. I expect that's because I have the wrong mental model of the encoding.
But what I was hoping for was to find some form of "per word numeric identity" in the graph, lurking at the moment of serialization.
` void WriteLists(Queue pending, LongestListsPerHash longest, IDawgStateWriter writer)
{
while (pending. Count > 0)
{
var current = pending. Dequeue();
Any suggestions or help appreciated. I'm going back to reread. Thanks again.! :)
The text was updated successfully, but these errors were encountered: