public int MatchTags(SolarixGrammarEngineNET.SyntaxTreeNode token, SolarixGrammarEngineNET.GrammarEngine2 gren)
{
foreach (TagMatcher m in matchers)
{
if (m.Match(token, gren))
{
return(m.GetId());
}
}
int entry_id = token.GetEntryID();
int pos_id = gren.GetEntryClass(entry_id);
string part_of_speech = gren.GetClassName(pos_id);
string tags = string.Join(" ", token.GetPairs().Select(z => string.Format("{0}={1}", gren.GetCoordName(z.CoordID), gren.GetCoordStateName(z.CoordID, z.StateID))).ToArray());
string msg = string.Format("Can not find tag for {0} {{ {1} {2} }}", token.GetWord(), part_of_speech, tags);
throw new ApplicationException(msg);
}