• Post Reply Bookmark Topic Watch Topic
  • New Topic

Finding a letter sequence in an arraylist using Java  RSS feed

 
Dhivya Krishnan
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am finding problem in finding the letter sequence.

A word that can be pronounced is marked as letter sequence(LS).

For Ex- ABC; builder will have a LS marked as it can't be pronounce.
But ABA; builder will not have a LS mark as it can be pronounced.

so if have all these names in an arraylist i need to find those letter sequence to be fetched seperately.

can someone please help me on this.

Thanks in advance.
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do you know if a letter sequence can be pronounced or not? Where is those set of LS maintained? If you have a valid list of LS, you can do a Union to fetch the results of valid LS from the incoming Set.
 
Dhivya Krishnan
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I dont have a list of LS., i need to use some logic to find continuous in sequence alphabets.,

fo eg., i need to find out if the word has ABC, PQR, XYZ, LMN something like this can it be done?
 
Tim Cooke
Marshal
Posts: 4043
239
Clojure IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is your criteria for whether or not a sequence of letters can be pronounced? Be very specific with your answer to this question.
 
fred rosenberger
lowercase baba
Bartender
Posts: 12563
49
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dhivya Krishnan wrote:I dont have a list of LS., i need to use some logic to find continuous in sequence alphabets.,

fo eg., i need to find out if the word has ABC, PQR, XYZ, LMN something like this can it be done?
\

A continuous sequence of letters of the alphabet may or may not be pronounceable. "NOP" is in many words. I believe there are even some words that DO begin with ABC, some that begin with DEF, etc.

The bigger issue that we are trying to push you towards is coming up with a decent set of specs. You have to have - in unambiguous terms - what EXACTLY your program needs to do. Pretend you are talking to a young child. And example is terrific, but it doesn't answer all cases. Are you only concerned about three letter sequences? Are you only concerned with English words?

You need to know all the rules of what your program should do before you write line 1 of code. so... "Can it be done?" Sure - if you come up with the proper set of specs/requirements.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!