/// <summary> /// Queries the specified tokens. /// </summary> /// <param name="tokens">The tokens.</param> /// <param name="scope">The scope.</param> /// <param name="side">The side.</param> /// <returns></returns> public apertiumDictionaryResult query(IEnumerable <String> tokens, apertiumDictQueryScope scope = apertiumDictQueryScope.startingWith, apertiumDictNeedleSide side = apertiumDictNeedleSide.native) { apertiumDictionaryResult output = new apertiumDictionaryResult(); List <String> queryList = new List <string>(); foreach (String tkn in tokens) { if (!tkn.isNullOrEmpty()) { queryList.Add(makeQuery(tkn, scope, side)); } } var res = dictionaryOperator.Search(queryList, true, RegexOptions.IgnoreCase); foreach (String line in res.getLines(true)) { output.addLine(line); } return(output); }
/// <summary> /// Queries the specified token /// </summary> /// <param name="token">The token.</param> /// <param name="scope">The scope.</param> /// <param name="side">The side.</param> /// <returns></returns> public apertiumDictionaryResult query(String token, apertiumDictQueryScope scope = apertiumDictQueryScope.startingWith, apertiumDictNeedleSide side = apertiumDictNeedleSide.native) { apertiumDictionaryResult output = new apertiumDictionaryResult(); String query = makeQuery(token, scope, side); fileTextSearchResult res = dictionaryOperator.Search(query, true, 50, RegexOptions.IgnoreCase); foreach (var pair in res) { output.addLine(pair.Value); } return(output); }