fenis100
Posts: 1
Joined: Thu Aug 22, 2019 2:20 pm

very slow Italian stemmer

Thu Apr 02, 2020 3:12 pm

I tried to develop a stemmer for Italian, but the bot is much slower. What am I doing wrong?
Debugging the code, I saw that the stemmer is called for each expression present in the siml for each message, is it correct?
My stemmer:
public class ItalianStemmer : StemmerOperations, Syn.Bot.Oscova.Interfaces.IStemmer
{
Annytab.Stemmer.IStemmer stemmer = new Annytab.Stemmer.ItalianStemmer();
public string Stem(string word)
{
return stemmer.GetSteamWord(word);
}
}

User avatar
Leslie
Lead Software Architect
Posts: 375
Joined: Fri Sep 14, 2012 12:20 pm
Contact: Website

Re: very slow Italian stemmer

Thu Apr 02, 2020 11:14 pm

Your approach is correct. Oscova will use the stemmer for all words in every expression. In order to speed up maybe you could implement a cache system using a Dictionary that will keep track of previously computed stems.

Return to “Report Bugs and Issues”

Who is online

Users browsing this forum: No registered users and 2 guests