Question: Given a raw string with a job title, find the clean tittle that matches best (Python pls): 1st: Scoring criteria: Most number of matching words

Given a raw string with a job title, find the clean tittle that matches best (Python pls):

1st: Scoring criteria: Most number of matching words (1st problem)

2nd: Scoring Criteria: Most number of matching letters (2nd problem)

Example 1:

raw_title = "Lead Financial Advisor from New York"

clean_titles = [ "Product Manager", "Chemistry Professor", "Financial Advisor", "Lead Financial Advisor", "Tech Bro", "Finance Bro"]

correct return = "Lead Financial Advisor" (since this one has the most words from the clean title)

Example 2:

raw_title = "Neurologist"

clean_titels = ["Neurobiologist", "Neurosurgeon", "Plastic Disposer", "Software Engineer", "Mechanical Engineer"]

correct return = "Neurobiologist (has the most amount of matching letters)

I would need help with both questions (individually) please, but if can only help with one then with the one of matching words.

Thank you

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!