Aricent Interview Question
ConsultantsWell this is not so hard I guess. If we take care of the following rules.Then I think we can write the algo.
1) A sentence is a group of words which starts with a capital letter and ends with a full stop (.), question mark (?) or exclamation mark (!).
2) Have a set of special abbreviation like Mr. Mrs, Dr. etc. Match them while selecting sentences. (This can be extracted from file as well using regx)
i dint get the question correctly, can someone elaborate the question please?
can't we do a simple file read line by line withou assuming that the content is in english? what s the issue with this approach...is it the case that the file contains non-english content as well? or i'm missing something?
The person who has asked this questions doesn't know English language very well. What does he expect, the candidate is a C++ compiler ?
My answer to outsmart this bloke:
I will open the text file in the notepad and start reading it (LOUD).
A finite state machine which upon receipt of . character whether to accept it as part of abbreviation or sentence depending on the previous character.
- Anonymous February 18, 2010