Commit 2de6e7b4 authored by Neeme Kahusk's avatar Neeme Kahusk
Browse files

vistnoun lang visdic relations

parent 9e535cf8
......@@ -62,6 +62,8 @@ POINTER_SYMBOLS = { # (symbol, pos):
'vis':'member_of_topic'},
('-u','v'):{'gloss':'Member of this domain - USAGE',
'vis':'member_of_usage'},
('-r','v'):{'gloss':'Member of this domain - REGION',
'vis':'member_of_region'},
# The pointer_symbol s for adjectives are:
......@@ -79,6 +81,9 @@ POINTER_SYMBOLS = { # (symbol, pos):
'vis':'member_of_topic'},
('-u','a'):{'gloss':'Member of this domain - USAGE',
'vis':'member_of_usage'},
('-r','a'):{'gloss':'Member of this domain - REGION',
'vis':'member_of_region'},
# The pointer_symbol s for adverbs are:
......@@ -93,16 +98,19 @@ POINTER_SYMBOLS = { # (symbol, pos):
('-u','r'):{'gloss':'Member of this domain - USAGE',
'vis':'member_of_usage'},
('+','r'):{'gloss':'Derivationally related form','vis':'derivated_from'}, # NON-DOCUMENTED
('-r','r'):{'gloss':'Member of this domain - REGION',
'vis':'member_of_region'},
}
def deadj(iStr):
"""Remove part in parentheses (used at adjectives)
"""
if iStr.count('('):
return iStr[0:iStr.index('(')]
elif iStr.count('<'):
if iStr.count('<'):
return iStr[0:iStr.index('<')]
elif iStr.count('('):
return iStr[0:iStr.index('(')]
else:
return iStr
......
#!/bin/bash
# usage: vistnoun.sh <start> <pos>
# usage: vistnoun.sh <start> <pos> [<lang>]
# ulimit will come from data file
# $1 => start
# $2 => POS
# $3 => lang
i=$1
wnpath=$HOME/Wordnet/WordNet-3.0/dict/
# wnpath=$HOME/Wordnet/FinWN/fiwn-2.0/dict
if [ "$3" == fin ]; then
wnpath=$HOME/Wordnet/FinWN/fiwn-2.0/dict
prefix="fin-20"
else
wnpath=$HOME/Wordnet/WordNet-3.0/dict/
prefix="pwn-30"
fi
ulimit=$[$(cat $wnpath/data.$2|egrep -v '^ '|wc -l)-1]
echo $ulimit
......@@ -17,6 +24,6 @@ do
then j=$[$ulimit+1]
fi
echo $i $j
python visdic.py -p $2 -r 'pwn-30' -s $i -e $j
python visdic.py -p $2 -r $prefix -s $i -e $j
i=$[$i+200]
done
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