Ejemplo n.º 1
0
 internal Noun(NounRaw raw, string word)
 {
     this.Word = word;
     if (raw.Word != null)
     {
         Gender      = raw.Gender;
         SchemaIndex = raw.SchemaIndex;
     }
 }
Ejemplo n.º 2
0
        static NounRaw ParseNoun(string line)
        {
            var parts = line.Split('\t');

            var wordStr   = parts[0];
            var genStr    = parts[1];
            var schemaStr = parts[2];

            var noun = new NounRaw();

            noun.Word = wordStr;
            switch (genStr)
            {
            case "м": noun.Gender = Gender.M; break;

            case "ж": noun.Gender = Gender.F; break;

            case "с": noun.Gender = Gender.N; break;

            case "мо": noun.Gender = Gender.MA; break;

            case "жо": noun.Gender = Gender.FA; break;

            case "со": noun.Gender = Gender.NA; break;

            case "мо-жо": noun.Gender = Gender.MAFA; break;

            case "мн": noun.Gender = Gender.P; break;

            default: noun.Gender = Gender.Undefined; break;
            }

            noun.SchemaIndex = schemas.GetOrAddSchemaId(schemaStr);

            return(noun);
        }