std::string Word::GetPOS() const { if (!HasPOS()) { return ""; } return ele.Attribute("pos"); }
// предлог "c" bool CRusSemStructure::DealWithNodePrepS(long NodeNo) { long nd = NodeNo; if (m_Nodes[NodeNo].m_NodeType == MNA) nd = GetFirstMNAMemberIfHas(NodeNo); long PrepNo; if (!CheckGroupBeginAndCase("с+Т",nd, PrepNo)) return false; long SourceNodeNo = FindLeftClosestNode(nd); if (SourceNodeNo == -1) return false; if (!IsInClause (SourceNodeNo, m_Nodes[nd].m_ClauseNo)) return false; if (!HasRichPOS (SourceNodeNo, NOUN) && !HasPOS(SourceNodeNo, PRONOUN) ) return false; CValency V ("TOGETHER", A_C,0); assert(PrepNo != -1); AddRelation(CRusSemRelation(V, SourceNodeNo, NodeNo, "")); m_Relations[m_Relations.size() - 1].m_SynReal.m_Preps.push_back(m_Nodes[NodeNo].m_SynReal.m_Preps[PrepNo]); m_Nodes[SourceNodeNo].m_Vals.push_back(V); return true; }
bool CWord::HasOnlyPOS(TGrammar POS) const { return GetRusHomonymsCount() == 1 && HasPOS(POS); }
bool CWord::HasOnlyPOS(const TGramBitSet& POS) const { return GetRusHomonymsCount() == 1 && HasPOS(POS); }
bool CHomonymBase::HasAnyOfPOS(const TGrammarBunch& POS) const { for (TFormIter it(POS); it.Ok(); ++it) if (HasPOS(*it)) return true; return false; }
bool CHomonymBase::HasPOS(const TGramBitSet& grammems, const TGramBitSet& POS) { //static return (POS.count() == 1) ? HasPOS(grammems, POS.FindFirst()) : grammems.HasAll(POS); }