I am reworking a Marathi-English dictionary to be out on open-source. My dictionary has the Headword in Marathi, followed by its Part of Speech and subsequently by its English glosses as in the examples below;
As can be seen the delimiter of the gloss is either a comma or a semi-colon
To make the dictionary more accessible and easily readable and concise, I want to retain only single words or words with the following
At present I have written a macro in Ultraedit: a Word processor to do the job. It uses a regex to identify all glosses with single words (with the condition specified above)
However Macros are slow and since the database is around 400.000+ words,I wonder if there is a means of identifying such single glosses through an awk or perl script. Thus in the example above, only the following will be retained
I normally have the painful task of further removing cases where a word has a single gloss as well as a long definition as in
which is reduced to
If both stages can be handled, it would really help a lot.
I work in a Windows environment. Many thanks for any help given which will be gratefully acknowledged by the community once this simplified dictionary is put on line.
Is it possible to grep all words with the string "con" "Con" "CON" etc. etc. from a dictionary?
for instance "magic command 'con' dictionary" will spit out words such as Confluence, contended, inconceivable etc etc.
I really need this! Thank you! (14 Replies)
Hi..
How to search for multiple words in a single line using grep?.
Eg: Jack and Jill went up the hill
Jack and Jill were best friends
Humpty and Dumpty were good friends too
----------
I want to extract the 2nd statement(assuming there are several statements with... (11 Replies)
Hi Guys,
Can someone help me with a way to extract text between two words on a single line.
For example if the file has below content I want to extract all text between b and f inclusive of b and f. Aparently sed does this but does it line by line and I guess it cannot read word by word.
... (11 Replies)
Hi,
I have written the following python snippet to store the capital letter starting words into a dictionary as key and no of its appearances as a value in this dictionary against the key.
#!/usr/bin/env python
import sys
import re
hash = {} # initialize an empty dictinonary
for line in... (1 Reply)
Hello,
I have a database of name variants with the following structure:
variant=variant=variant
The number of variants can be as many as thirty to forty.
Since the database is quite large (at present around 60,000 lines) duplicate sets of variants creep in. Thus
John=Johann=Jon
and... (2 Replies)
Dear All,
I have set of CSV files (comma separated) and each column have some information in them separated by space. Now I want to count them but have not been successful...
Example data
desired outcome
I have tried few things including the link below.
for C in $FILES
do... (8 Replies)
Dear all,
I am editing a tri-lingual dictionary for open source which has the following data structure
English headwords <Tab>Devanagari Headwords<Tab>PersoArabic headwords
as in the example below
to mark, to number अंगणु (اَنگَڻُ)
The English headword entry has at times more than one word,... (2 Replies)
Hello,
I have a dictionary which I am building for the Open Source Community. The data structure is as under
HEADWORD=PARTOFSPEECH=ENGLISH MEANING
as shown in the example below
अ=m=Prefix signifying negation.
अँहँ=ind=Interjection expressing disapprobation.
अं=int=An interjection... (2 Replies)