Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Alain Shakour
clowdflows
Commits
1ab15256
Commit
1ab15256
authored
Nov 27, 2012
by
matjaz
Browse files
Nl_toolkit package modifications.
parent
b77153ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
workflows/nl_toolkit/library.py
View file @
1ab15256
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
=
[]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment