retnuh / tokenfsm

A small Token Finite State Machine for reading sequences of tokens in a single pass
The Unlicense
0 stars 0 forks source link

Multiple lexicon handling #1

Open mromerocanta opened 7 years ago

mromerocanta commented 7 years ago

We are using your TokenFSM algorithm as part of our system for detecting terms from lexicons. It would be great if it could handle multiple lexicons at the same time, instead of having to create a different object for each one.

There are a couple of considerations:

2) If the match is exactly the same in both lexicons, then return both: Lex1 {"US"} Lex2{"US"} -- Term "US intelligence reports say...." Output: {"US":Lex1, "US":Lex2}

Cheers!

retnuh commented 7 years ago

Sorry for the slow response, github didn't email me, strangely. I'll take a look at this soon; it will likely be sometime next week.

Cheers!