Skip to content
Snippets Groups Projects
Commit 021a499a authored by Alfen, T. van (Tanja)'s avatar Alfen, T. van (Tanja)
Browse files

Delete dutchwordnet_test.py

parent df9e7ea1
No related branches found
No related tags found
No related merge requests found
from OpenDutchWordnet.wn_grid_parser import Wn_grid_parser
from semantic_checker import SemanticChecker
instance = Wn_grid_parser("OpenDutchWordnet/resources/odwn/odwn_orbn_gwg-LMF_1.3.xml.gz")
instance.load_synonyms_dicts()
sc = SemanticChecker(instance)
#A test case for when the second word is a hypernym of the first
print(sc.semantically_related('hond','carnivoor'))
#A test case for when the first word is a hypernym of the second
print(sc.semantically_related('carnivoor','hond'))
#A test case for when both words are known yet not related.
print(sc.semantically_related('water','hond'))
#A test case for when both words are known and considered synonyms
print(sc.semantically_related('huis','woning'))
#A test case for when the second word is unknown
print(sc.semantically_related('hond','atestword'))
#A test case for when both words are unknown
print(sc.semantically_related('testfirstword','sometestword'))
#A test case for when the first word is unknown
print(sc.semantically_related('xxxxxxx','carnivoor'))
#A test case for when the two words share a hypernym
print(sc.semantically_related('vork','mes'))
#Other test cases to check for other words:
print('And now for the other test cases:')
print(sc.semantically_related('het','de'))
print(sc.semantically_related('een','ander'))
print(sc.semantically_related('woord','zin'))
print(sc.semantically_related('naam','persoon'))
print(sc.semantically_related('MSDT','project'))
print(sc.semantically_related('dog','pet'))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment