0

[HELP] Ways to differentiate the name and the title

Is there any way, we can differentiate someones name and his/her surname from a given list. suppose someone collected the names of different persons from different sources in a single list. we know that names of the author in IEEE format is surname comes first then the name comes( eg. Nath Sudipta). which is different from the normal format. and where all the names are collected (listed) it doesn't have any details of the source from which it is taken. ***any help or idea is appreciated***

8th Nov 2017, 5:43 PM
Sudipta Kumar Nath
Sudipta Kumar Nath - avatar
5 odpowiedzi
0
@netkos ent you havent understand my question. suppose in a database names are given. 1.mahatma gandhi 2. modi narendra 3. virat kohli 4. tendulkar sachin ...... like that. then we have to store the store the names and the surname in xtra column. the first name and title is not scripted. we have to find it using logic. im asking the logic. (coding is different part)
8th Nov 2017, 6:49 PM
Sudipta Kumar Nath
Sudipta Kumar Nath - avatar
+ 4
Is there any way? Yes, many ways. However, you didn't specify what you're actually using, and I don't have time to explain it in every language that I know. Throw more information to us on what you're using and we can help you out easily. (what language / framework / system / etc..) Also, post what you've tried so far.
8th Nov 2017, 6:17 PM
AgentSmith
+ 4
If there is nothing to indicate one format over the other, there isn't much logic to it other than correcting the issue of not having some system of indication. Again, if I didn't tell you, there is no logical way to know if Netkos is my first or last name unless you ask me. Either way, I hope it works out for you. If you come to some solution, come back and post it; I'm curious to know the answer.
8th Nov 2017, 7:15 PM
AgentSmith
+ 3
If I understood correctly this time, you have something like: COL A = Raw Name COL B = First Name COL C = Last Name You want to take the raw name (which could be any format of first/last or last/first) and separate the data into the First Name and Last Name fields? Most often, when it's last/first name, a comma is used to help distinguish that it's in that format. As such, you can use that to accomplish what you're trying to do. The logic is to take the data from that field, check if it contains a comma, split the data based upon the comma, store the first element into last name, store the second element into first name. If it doesn't have a comma, split it based upon the whitespace, store first element into first name, store second element into last name. Again, without having more information on what you're actually using, I can't say anything beyond a vague explanation of the logic I would use. Also, if it doesn't have a comma or other means of distinguishing the format, then you won't obtain an accurate result. For example: Raw Data: Netkos Ent Raw Data: Ent Netkos ^If that's your raw data, and you've no idea what format it is or it doesn't provide an indicator of the format (such as a comass), then there is no way for you to know which is my first or last name unless you ask me. Raw Data: Netkos Ent First Name: Netkos Last Name: Ent Raw Data: Ent, Netkos First Name: Netkos (separated based upon the comma, value that was right of comma is first name, store it here.) Last name: Ent (separated based upon the comma, value that was left of comma is last name, store it here.)
8th Nov 2017, 6:58 PM
AgentSmith
- 1
yes, the problem is without indicator. although accuracy is not guaranteed i am searching a logical solution to this problem. and title or surname doesn't have any fixed constraint so it will be complicated.
8th Nov 2017, 7:09 PM
Sudipta Kumar Nath
Sudipta Kumar Nath - avatar