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
From johann-petrak/gateplugin-StringAnnotation#10
Try to at least support matches where certain characters can be treated equal to embedded white space, e.g. hyphens.
This could maybe get implemented as part of our own trie implementation, but see the issue about using jaspell for a possible alternative.
Also, see if we can use gateplugin-ft-distance (GateNLP private so far)
I'm using your Extended Gazetteer with several millions of entries and it works very well, thanks for that!
To contribute to the ideas about non-exact matches, I can share my method:
creation of different versions of gazetteer directories from a source gazetteer directory with a Java script
for example one is with normalized punctuation, then accent, stemmed, metaphone, etc.
point to the needed gazetteer in the .def file, for entities it will be punctuation and/or accent, for concepts it will be stemmed
add a Jape grammar with the same code as the previous Java script before the Extended Gazetteer to create as many Token features as type of gazetteer, for example: normalized, punctuation, stemmed, etc.
set the feature in the parameters of the Extended Gazetteer
This method allows to choose the best normalization for each gazetteer and it's easy to change it as all the type of gazetteers are always created by the Java script and also the Token features by the Jape grammar.
Thanks Thomas! Yes, this is a good method, when it is possible to generate most or all of the alternatives one wants to match automatically.
However, sometimes users want to match in a way that cannot be predicted, e.g. based on Levenshtein distance, phonetic similarity or some such. If there is a well defined distance metric between the strings, it is possible to implement this as an extension to the trie matching algorithm but it is not easy to implement.
Activity
johann-petrak commentedon Jun 18, 2018
From johann-petrak/gateplugin-StringAnnotation#13
There are various possible approaches, several of them based on tries.
See also http://dbgroup.cs.tsinghua.edu.cn/dd/projects/taste/index.html
thomas-heitz commentedon Aug 26, 2018
Hello Johann,
I'm using your Extended Gazetteer with several millions of entries and it works very well, thanks for that!
To contribute to the ideas about non-exact matches, I can share my method:
This method allows to choose the best normalization for each gazetteer and it's easy to change it as all the type of gazetteers are always created by the Java script and also the Token features by the Jape grammar.
johann-petrak commentedon Aug 26, 2018
Thanks Thomas! Yes, this is a good method, when it is possible to generate most or all of the alternatives one wants to match automatically.
However, sometimes users want to match in a way that cannot be predicted, e.g. based on Levenshtein distance, phonetic similarity or some such. If there is a well defined distance metric between the strings, it is possible to implement this as an extension to the trie matching algorithm but it is not easy to implement.
thomas-heitz commentedon Aug 30, 2018
I also plan to use the double metaphone then levenshtein for a phonetic match.