Beispiel #1
0
		protected internal Relation(WordNetEngine wordNetEngine, RelationType relationType, int targetSynsetOffset, string targetSynsetPartOfSpeech)
		{
			mWordNetEngine = wordNetEngine;
			mRelationType = relationType;

			mTargetSynsetOffset = targetSynsetOffset;
			mTargetSynsetPartOfSpeech = targetSynsetPartOfSpeech;
		}
 protected internal RelationType(string name, RelationType opposite, string[] partsOfSpeech)
 {
     mName = name;
     mOpposite = opposite;
     mPartsOfSpeech = partsOfSpeech;
 }
        public override RelationType[] GetRelationTypes(string lemma, string partOfSpeech)
        {
            IndexWord indexWord = GetIndexWord(lemma, partOfSpeech);

            if (indexWord != null)
            {
                if (indexWord.RelationTypes != null)
                {
                    int relationTypeCount = indexWord.RelationTypes.Length;
                    RelationType[] relationTypes = new RelationType[relationTypeCount];
                    for (int currentRelationType = 0; currentRelationType < relationTypeCount; currentRelationType++)
                    {
                        relationTypes[currentRelationType] = mRelationTypeDictionary[indexWord.RelationTypes[currentRelationType]];
                    }
                    return relationTypes;
                }
                return null;
            }
            return null;
        }
Beispiel #4
0
		protected internal Relation(WordNetEngine wordNetEngine, RelationType relationType, int targetSynsetOffset, string targetSynsetPartOfSpeech, int sourceWord, int targetWord) : this(wordNetEngine, relationType, targetSynsetOffset, targetSynsetPartOfSpeech)
		{
			miSourceWord = sourceWord;
			miTargetWord = targetWord;
		}
Beispiel #5
0
 protected internal RelationType(string name, RelationType opposite, string[] partsOfSpeech)
 {
     mName          = name;
     mOpposite      = opposite;
     mPartsOfSpeech = partsOfSpeech;
 }
Beispiel #6
0
 protected internal Relation(WordNetEngine wordNetEngine, RelationType relationType, int targetSynsetOffset, string targetSynsetPartOfSpeech, int sourceWord, int targetWord) : this(wordNetEngine, relationType, targetSynsetOffset, targetSynsetPartOfSpeech)
 {
     miSourceWord = sourceWord;
     miTargetWord = targetWord;
 }