Open flekschas-ozette opened 2 years ago
It's a fairly simple fix and I got it running already in a local branch. I am happy to set up a PR.
I'd be happy to review your PR. It's been a while so I don't recall why I reserved some characters - I do remember that this was only designed to work with plain alphabetics (7-bit ascii characters) in words; so there could be multiple issues with introducing other characters out of that range.
Words with underscores are reported as not present in a word collection with
isWord
I guess this is because
Node
has special properties like_c
that use_
and hence anyprop
starting with_
is excluded innode.props()
https://github.com/mckoss/dawg/blob/master/src/node.ts#L88.I guess a safer option would be to store props in their own dictionary like
node.props
. Otherwise the only option I can think of is to replace_
prior to creating the Trie and beforeisWord
but that seems less ideal.