Your task is to write a script that extracts the first name for all the different ways of writing the author names as pe

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Your task is to write a script that extracts the first name for all the different ways of writing the author names as pe

Post by answerhappygod »

Your task is to write a script that extracts the first name for
all the different ways of writing the author names as per the
example code (the different variations have been simplified
some).
You will need to use multiple functions. You are free to use
regular expressions if you want, but it is not necessary and I have
not used them in my solution. You should not compare to namelists,
but instead create rules in a flowchart like manner. You will
likely need helper functions that check for the presence of commas,
periods, certain titles, parentheses etc.
For (almost) any code that works and does the job correctly, you
will receive at least 30 points. For the full 50 points for this
task, all the names need to be extracted correctly, with no hard
coding (checking for specific names for example), and proper reuse
of functions (i.e. depending on your chosen approach, you are
likely to need to use recursive functions to check for names inside
parentheses).
There are infinite ways to solve this task so use your
creativity. I recommend writing down what needs to be checked and
in which order on paper (like a step-by-step list or flowchart),
then writing the names of the functions you need with comments
describing what will need to take place inside those functions.
Then you can start testing one function at a time and ultimately
merge them all.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply