• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Finding Acronyms In a Text File

 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What will be the logic to find acronyms in a text file?
 
Marshal
Posts: 28226
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Marshal
Posts: 79239
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to work out exactly what you intend to do, before you even try to do it.
 
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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'.
 
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
lowercase baba
Posts: 13089
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 79239
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Marshal
Posts: 28226
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic