python - How do you add a text file in IEER? -


i want make text file in ieer corpus format can use functions extract_rels() , parsed_docs() directly. how that? using python , nltk.

what tried

ws = nltk.corpus.reader.ieer.ieercorpusreader(corpus_root, 'doc1.txt') print ws.fileids() #ws instantaneous of ieer corpus relation=re.compile(r'\bin\b') t in ws.fileids(): doc in ws.parsed_docs(t): rel in nltk.sem.extract_rels('per', 'loc', doc , corpus='ieer', pattern=relation): print nltk.sem.clause(rel, relsym= 'relation' ) did no output coming , no error..


Comments

Popular posts from this blog

java - Andrioid studio start fail: Fatal error initializing 'null' -

android - Gradle sync Error:Configuration with name 'default' not found -

StringGrid issue in Delphi XE8 firemonkey mobile app -