Exemplo n.º 1
0
 public CatEntry(string cat)
 {
     if (cat.Equals("verb"))
     {
         verbEntry_ = new VerbEntry();
     }
     else if (cat.Equals("noun"))
     {
         nounEntry_ = new NounEntry();
     }
     else if (cat.Equals("adj"))
     {
         adjEntry_ = new AdjEntry();
     }
     else if (cat.Equals("adv"))
     {
         advEntry_ = new AdvEntry();
     }
     else if (cat.Equals("aux"))
     {
         auxEntry_ = new AuxEntry();
     }
     else if (cat.Equals("modal"))
     {
         modalEntry_ = new ModalEntry();
     }
     else if (cat.Equals("pron"))
     {
         pronEntry_ = new PronEntry();
     }
     else if (cat.Equals("det"))
     {
         detEntry_ = new DetEntry();
     }
 }
Exemplo n.º 2
0
        public CatEntryGJdV(LexRecord lexRecord)

        {
            string cat = lexRecord.GetCategory();

            if (cat.Equals("verb"))

            {
                verbEntry_ = new VerbEntry(lexRecord);
            }
            else if (cat.Equals("noun"))

            {
                nounEntry_ = new NounEntry(lexRecord);
            }
            else if (cat.Equals("adj"))

            {
                adjEntry_ = new AdjEntry(lexRecord);
            }
            else if (cat.Equals("adv"))

            {
                advEntry_ = new AdvEntry(lexRecord);
            }
            else if (cat.Equals("aux"))

            {
                auxEntry_ = new AuxEntry(lexRecord);
            }
            else if (cat.Equals("modal"))

            {
                modalEntry_ = new ModalEntry(lexRecord);
            }
            else if (cat.Equals("pron"))

            {
                pronEntry_ = new PronEntry(lexRecord);
            }
            else if (cat.Equals("det"))

            {
                detEntry_ = new DetEntry(lexRecord);
            }
        }
Exemplo n.º 3
0
 /// <inheritdoc />
 public AuxEntry ParseEntry(string line)
 {
     if (line.StartsWith(@"\relax"))
     {
         return(new AuxEntry(AuxEntryType.Relax));
     }
     else if (line.StartsWith(@"\bibstyle"))
     {
         return(new AuxEntry(AuxEntryType.Bibstyle)
         {
             Key = line.Replace(@"\bibstyle", "").TrimIgnoredCharacters()
         });
     }
     else if (line.StartsWith(@"\citation"))
     {
         return(new AuxEntry(AuxEntryType.Citation)
         {
             Key = line.Replace(@"\citation", "").TrimIgnoredCharacters()
         });
     }
     else if (line.StartsWith(@"\bibdata"))
     {
         return(new AuxEntry(AuxEntryType.Bibdata)
         {
             Key = line.Replace(@"\bibdata", "").TrimIgnoredCharacters()
         });
     }
     else if (line.StartsWith(@"\bibcite"))
     {
         var entry = new AuxEntry(AuxEntryType.Bibcite);
         var info  = line.Replace(@"\bibcite", "").TrimIgnoredCharacters().Split("}{", StringSplitOptions.RemoveEmptyEntries);
         entry.Key   = info.Length > 0 ? info[0] : null;
         entry.Label = info.Length > 1 ? info[1] : null;
         return(entry);
     }
     else
     {
         return(null);
     }
 }