• Post Reply Bookmark Topic Watch Topic
  • New Topic

Finding Acronyms In a Text File  RSS feed

 
Ayan Biswas
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What will be the logic to find acronyms in a text file?
 
Paul Clapham
Sheriff
Posts: 22829
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That depends on your requirements.

For example, you didn't mention whether you had a predefined list of acronyms you were looking for, or whether you just had to identify character strings which represented acronyms. That represents a significant difference. I'm sure there are other significant requirements which you haven't described. So, before you start asking for logic, you have to answer the question "Logic for what, exactly?"
 
Ayan Biswas
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Paul Clapham

That depends on your requirements.

For example, you didn't mention whether you had a predefined list of acronyms you were looking for, or whether you just had to identify character strings which represented acronyms. That represents a significant difference. I'm sure there are other significant requirements which you haven't described. So, before you start asking for logic, you have to answer the question "Logic for what, exactly?"

Sorry for not being precise.No,I do not have any predefined list of acronyms.I have to parse a text file and find the acronyms from it.
 
Campbell Ritchie
Marshal
Posts: 56546
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to work out exactly what you intend to do, before you even try to do it.
 
Joanne Neal
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ayan Biswas wrote:Sorry for not being precise.No,I do not have any predefined list of acronyms.I have to parse a text file and find the acronyms from it.

That's no more precise than your first post. An acronym is a set of initial letters of words of a phrase/description/name/etc which when put together form another word. So as you don't have a predefined list of acronyms that you are looking for, your requirement at the moment is 'find all the words in a file'.
 
Winston Gutkowski
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joanne Neal wrote:An acronym is a set of initial letters of words of a phrase/description/name/etc which when put together form another word. So as you don't have a predefined list of acronyms that you are looking for, your requirement at the moment is 'find all the words in a file'.

And even if you do, you may still run into problems, because acronyms like AIDS and TWAIN are actually valid words (indeed, the second one isn't even an abbreviation according to the TWAIN Working Group). Did you also know that the word 'amphetamine' is actually an acronym? I didn't.

Winston
 
fred rosenberger
lowercase baba
Bartender
Posts: 12563
49
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your first step is to define what makes something an acronym. It needs to be detailed and specific. Imagine if you were trying to explain to someone who had never seen written words before. You can talk to them and explain what you need, but they don't know what the word 'acronym' means.
 
Campbell Ritchie
Marshal
Posts: 56546
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Winston Gutkowski wrote:. . . Did you also know that the word 'amphetamine' is actually an acronym? I didn't. . . .
You sure about that? On Wikipedia it says it’s a contraction of alpha-methylphenethylamine.
 
Joanne Neal
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
a(lpha) + m(ethyl) + ph(enyl) + et(hyl) + -amine
It stretches the defintion of an acronym a little, but if you consider alpha-methylphenethylamine to be a portmanteau word, then I guess it's reasonable.
 
Paul Clapham
Sheriff
Posts: 22829
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joanne Neal wrote:
Ayan Biswas wrote:Sorry for not being precise.No,I do not have any predefined list of acronyms.I have to parse a text file and find the acronyms from it.

That's no more precise than your first post. An acronym is a set of initial letters of words of a phrase/description/name/etc which when put together form another word. So as you don't have a predefined list of acronyms that you are looking for, your requirement at the moment is 'find all the words in a file'.


Not even that. If the text file contained the word "combinatorial" would we be supposed to pick the acronym "NATO" out of it?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!