private bool HasSameNameType(Util.Set<string> entityNameSet, Util.Set<string> candidateNameSet)
 {
     foreach (string currentName in entityNameSet)
     {
         if (candidateNameSet.Contains(currentName))
         {
             return true;
         }
     }
     return false;
 }
示例#2
0
        private static bool IsHeadOfExistingMention(IParse nounPhrase, Dictionary<IParse, IParse> headMap, Util.Set<IParse> mentions)
		{
            IParse head = nounPhrase;
            while (headMap.ContainsKey(head))
            {
                head = headMap[head];
                if (mentions.Contains(head))
                {
                    return true;
                }
            }
            return false;
        }
 private bool HasSameHead(Util.Set<string> entityHeadSet, Util.Set<string> candidateHeadSet)
 {
     foreach (string currentHead in entityHeadSet)
     {
         if (candidateHeadSet.Contains(currentHead))
         {
             return true;
         }
     }
     return false;
 }