예제 #1
0
 public bool Contains(Word word)
 {
     if (HeadedPhrases == null)
     {
         return(false);
     }
     if (HeadedPhrases.Length == 0)
     {
         return(false);
     }
     return(HeadedPhrases.Any(x => x.Contains(word)));
 }
예제 #2
0
        public List <string> ToTokenList(string format, IFormatProvider formatProvider)
        {
            List <string> sb = new List <string>();

            if (HeadedPhrases != null)
            {
                sb.AddRange(particle, HeadedPhrases.Select(phrase => phrase.ToString(format, formatProvider)), format, formatProvider, parentChain != null);
            }
            else
            {
                throw new TpSyntaxException("No head phrases");
            }
            return(sb);
        }