Пример #1
0
 private SynSet(
     SynsetId id,
     IReadOnlyList <string> words,
     string gloss,
     LexicographerFileName lexicographerFileName,
     ILookup <SynSetRelation, SynsetId> relationSynSets,
     ILookup <SynSetRelation, (SynsetId synSetId, int sourceWordIndex, int targetWordIndex)> lexicalRelations)
Пример #2
0
        public static IndexEntry CreateFromLine(string l, PartOfSpeech partOfSpeech)
        {
            var fields = l.Split(' ', StringSplitOptions.RemoveEmptyEntries);

            var numberOfSynSets = int.Parse(fields[2]);

            var ids = new List <SynsetId>();

            for (var i = numberOfSynSets - 1; i >= 0; i--)
            {
                var id       = int.Parse(fields[fields.Length - 1 - i]);
                var synsetId = new SynsetId(partOfSpeech, id);
                ids.Add(synsetId);
            }

            var word = fields[0];

            return(new IndexEntry(word, partOfSpeech, ids));
        }