Off topic:match words from a file and then replace them with individual tokens in python
0
0
Entering edit mode
6.3 years ago

i have a text file with bigrams and ngrams, one bigram and ngram per line.what i want to do is to read each word from that file and then match that in original file. say i have a bigram "cricket match" .firstly,i have to take first word and will search that in original file if it matches then it will take second word. and will check where these 2 words occur together. and on those places where it occur together it will replace these 2 words as one term cricket match. i am not getting it,how i can do this.any help will be appreciated.

python programming • 1.1k views
ADD COMMENT
This thread is not open. No new answers may be added
Traffic: 2976 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6