mckoss / lookups Goto Github PK
View Code? Open in Web Editor NEWHighly optimized Trie/DAWG dictionary builder and lookups.
Home Page: http://lookups.pageforest.com
License: MIT License
Highly optimized Trie/DAWG dictionary builder and lookups.
Home Page: http://lookups.pageforest.com
License: MIT License
This library appears to be exactly what I need, but I'm having trouble figuring out how to use it and which are the minimal dependancies required to build a trie and then run lookups on it. When I try to load /scripts/ptrie-complete.js I get:
ReferenceError: namespace is not defined
at Object.<anonymous> (/Users/ESL/Desktop/hola/trie-test.js:1:442)
at Module._compile (module.js:434:26)
at Object.Module._extensions..js (module.js:452:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:475:10)
at startup (node.js:117:18)
at node.js:951:3
Weirdly, I get this same error even if I include /scripts/namespace.js before it. It's not obvious to me what namespace.js is...
I would love just a couple lines of code demonstrating how these fils are intended to be used. The index.html file is almost this, but it's currently broken at the moment because it tries to load resources that do not exist anymore.
I'd love to use this library in a project, but there is no license, so I am unsure about what is permissive and what is not.
Can you please update this repo to have a license?
hi mike, thanks for making this. I've found a tough bug. that can be reproduced in the online tool:
brian bruce bryan bryant bryce bryon buddy dejan burton byron caleb calvin carlo carlton carroll cedric cesar cha charle charli chester chri christian christopher chuck clarence clark claude clay clayton damian damien damon daniel danny darin dariu darwin dav davi david dean delbert deni demetriu denni derek derrick desmond deven devin dewayne dewey dexter
then lookup dejan
, which should be there.
i tried really hard to debug this. the regular trie finds dejan, but this node gets lost in the pack() method.
cheers
Hi,
This is a really cool library.
But the split regexp in trie.js
words = words.split(/[^a-zA-Z]+/);
IMO is a little bit to strict for eg: german language, where we have öäü ..
It would be nice to have the possibility to overwrite your defaults with a config object, that contains a regexp eg: /[^a-zA-ZöäüÖÄÜ]+/
And there is a console.log which you forgot to comment.
kind regards
Also allow tests to be run in node.js.
Use auto-namespace wrapper to build wrapped build product.
The packedTrie is really useful. However It doesn't support unicode characters
I tried to apply for a French dictionary. But It didn't work.
Can you fix it please.
Many thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.