/// <inheritdoc cref="MorphologyProvider.FindWord"/>
        public override MorphologyEntry[] FindWord
        (
            string word
        )
        {
            ManagedClient64 client   = Client.ThrowIfNull("Client");
            string          database = Database.ThrowIfNull("Database");


            client.PushDatabase(database);
            try
            {
                IrbisRecord[] records = client.SearchRead
                                        (
                    "\"K={0}\"",
                    word
                                        );
                MorphologyEntry[] result = records
                                           .Select(r => MorphologyEntry.Parse(r))
                                           .ToArray();

                return(result);
            }
            finally
            {
                client.PopDatabase();
            }
        }
Exemple #2
0
        public static MorphologyEntry Parse
        (
            [NotNull] IrbisRecord record
        )
        {
            if (ReferenceEquals(record, null))
            {
                throw new ArgumentException("record");
            }

            MorphologyEntry result = new MorphologyEntry
            {
                MainTerm   = record.FM("10"),
                Dictionary = record.FM("11"),
                Language   = record.FM("12"),
                Forms      = record.FMA("20")
            };

            return(result);
        }