Beispiel #1
0
        protected void AddToDictionary(string key, string lemma, POS pos)
        {
            LemmatizerItem val = new LemmatizerItem()
            {
                POS = pos, Form = key, Lemma = lemma
            };

            key = key.ToLower();
            if (lemmaMapping.ContainsKey(key))
            {
                if (!lemmaMapping[key].Contains(val))
                {
                    lemmaMapping[key].Add(val);
                }
            }
            else
            {
                lemmaMapping[key] = new List <LemmatizerItem>();
                lemmaMapping[key].Add(val);
            }
        }
Beispiel #2
0
 protected void AddToDictionary(String key, String lemma, POS pos)
 {
     LemmatizerItem val = new LemmatizerItem() { POS = pos, Form = key, Lemma = lemma };
     key = key.ToLower();
     if (lemmaMapping.ContainsKey(key))
     {
         if (!lemmaMapping[key].Contains(val))
         {
             lemmaMapping[key].Add(val);
         }
     }
     else
     {
         lemmaMapping[key] = new List<LemmatizerItem>();
         lemmaMapping[key].Add(val);
     }
 }
Beispiel #3
0
        public override bool Equals(object obj)
        {
            LemmatizerItem pos2 = (LemmatizerItem)obj;

            return(this.POS == pos2.POS && this.Form == pos2.Form && this.Lemma == pos2.Lemma);
        }