Is it somehow possible to extend stemming rules in text explorer platform with a new language, e.g. Danish?
Kind regards, Thomas
No, the stemming routines are built in and not currently exposed to JSL.
You might be able to do something with regex parsing, but it won't have all the behaviors of the built in stemming. For example, in English, I could build a regex that would blindly remove suffixes, something like this:
Using Result to rewrite tokens
And stemming isn't this simple in English; the internal routines cantain many special cases.
If you try it, \2 refers to the text matched by the 2nd paren group. The replacement value can have constant text (the * for example) and zero or more \N references to the match.
Also, in the example above, I think it should stem every word (work and eat too) like this
Better, maybe
That regex first tries to remove a stem (\2), then matches the whole word (\4). One of \2 and \4 is filled in for the result, the other is empty.
Thanks for the reply, Craige
I am familiar with regex'es and already use the regex rules in text explorer for a many things. Good idea with the * suffix. What I was hoping for is, that the stemming rules are stored in some script language or that it is possible to write an extension.
I believe if this is not possible, then using Snowball in a script could be an option: http://snowballstem.org/
Or even better, if snowball could be integrated directly in the text explorer platform, e.g. by providing an option to use Snowball if it is installed, would be great