Commit 1ab15256 authored by matjaz's avatar matjaz
Browse files

Nl_toolkit package modifications.

parent b77153ca
import re
def nl_toolkit_get_all_synsets(input_dict):
if input_dict['corpus'].lower()=='wordnet':
from nltk.corpus import wordnet as wn
synsets = {}
for word in input_dict['words']:
synsets[word] = wn.synsets(word)
return {'synsets' : synsets}
def nl_toolkit_get_word_synsets(input_dict):
if input_dict['corpus'].lower()=='wordnet':
from nltk.corpus import wordnet as wn
return {'synsets':wn.synsets(input_dict['word'])}
def nl_toolkit_create_integers(input_dict):
intStr = input_dict['intStr']
intList = []
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment