Click here to Skip to main content
15,887,585 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I'm trying to look for matching words between a text (type-string) & a list.

For this, I've converted the text into a list.

What I have tried:

Python
skill_list=['C', 'C++', 'Java', 'Python', 'Data Structures', 'HTML', 'CSS', 'SQL', 'MySQL', 'Machine Learning', 'ML', 'Deep Learning', 'NLP', 'Computer Vision', 'Numpy', 'Pandas', 'Tensorflow', 'Scikit-Learn', 'Pyteserract', 'OpenCV', 'BeautifulSoup', 'Big Data', 'Hadoop','Project Management', '.Net', 'Android Application Development', 'IST Testing', 'Oracle DB', 'JavaScript', 'Bootstrap React JS', 'Redux',
'QA Plan and Strategy',	'Operations Management', 'Automation Testing',	'Technology Planning', 'DMSC Process Audits', 'Delivery Management','QA/Test Management','Team Management', 'ETL Testing',	'UNQORK Product Testing', 'Angular JS', 'AWS', 'Configuration Management', 'Linux','Windows', 'Operating Systems', 'T-SQL', 'Automated Testing', 'Microsoft Azure', 'DevOps', 'SAP', 'GitHub', 'Cloud', 'Network Management','Cloud Infrastructure automation', 'Cloud Data migration', 'CloudData analytics', 'AWS security monitoring', 'Spring MVC', 'JDBC', 'Servlets',
'Hibernate']


#Splitting the text
Python
sp_tx=text.split()
type(sp_tx)


Output -->
Python
List

#Extracting common words
Python
common_list = set(sp_tx).intersection(skill_list)
common_list


Python
Output --->
{'AWS', 'Cloud', 'Windows'}



There are many more common words between my text & list. Why are only a few of them getting printed?
Posted
Updated 13-Sep-22 10:05am
v2
Comments
raddevus 13-Sep-22 16:01pm    
what does text variable look like?
Richard MacCutchan 13-Sep-22 16:03pm    
This is the second question on this subject, and again you are only showing small parts which do not make it clear what is happening.
Apoorva 2022 13-Sep-22 16:46pm    
My text is like this-->

Kty yu john Gmail: john@gmail.com Mobile: + 3418124475647 Profile: I have 3 year of experience in Front-End development and web applications using technologies such as Html, CSS, JavaScript and Bootstrap React JS, Redux. Summary: • Experience in design and configuration for implementation, development, maintenance, and support as a React.JS Developer to meet business needs. • Good working knowledge on React Hooks, Redux, JavaScript, CSS, HTML. • Developing new user-facing features using React.js • Building reusable components and front-end libraries for future use. • Strong proficiency in JavaScript, including DOM manipulation. • Thorough understanding of React.js and its core principles • Familiarity with newer specifications of ECMAScript • A proactive learner for adopting emerging trends and addressing industry requirements to achieve the organizational objectives. • Good communication, presentation, and interpersonal skills • Strong work ethics and commitment to work to achieve Client’s objectives. Experience:  Working as a Front-End Developer in yada Software Solutions Pvt Ltd  January 2019 to Present. Project Experience: Project:  Title : MediHost  Environment : HTML, CSS3, JavaScript, Bootstrap, React JS, Redux  Team Size 6  Role : React.JS Developer Description: This is a MediHost application It is purely based on Helath care it is a Service based online Application which provides delivering banking and Health Products and also Medical Equipments at doorsteps it is one environment and having strong user management System. This application Empowers the user Hierarchical Relationship. Roles & Responsibilities:  Responsible for understanding user requirements, designing and developing applications.  Involved in development of web applications using JavaScript, HTML, CSS3, Bootstrap and React JS, Redux.  Developed front end of the dashboard applications like Sidebar, Navbar, Cards Sign Up, Log In Forms Upload images and files.  Maintain the State Mangement by Redux Libraries. Technical Skills: • Web Technologies : Html5, CSS3, Bootstrap, React-bootstrap • Scripting language : JavaScript • Libraries : React Js, Redux, • Tools : Visual Studio Code Project: Title : SmartEdu Environment : HTML, CSS3, JavaScript, Bootstrap, React JS Team Size : 5 Role : UI Developer Description: One Stop for All School Activities. It is a React.js application where we build with several modules. Each one of them has many modules such as activity module, student module, payment/purchase module, dashboard with reports module, user management module. They offer educational ideas beyond academics, content, voice modulation. Roles & Responsibilities: • Involved in development of web applications using JavaScript, HTML, CSS3, React JS and Media- queries. • Developed front end of the admin- dashboard applications like Side Navigation, Contact-Form, Dropdowns. • Developed a static website with fully responsive. Education: • B. Tech Professional from yu Institute of Technology. Declaration: I hereby declare that all the details furnished above are true to the best of my knowledge and belief.





Apoorva 2022 13-Sep-22 16:48pm    
I converted the content from a PDF file to text using 'Tika Parser' & my data/text turned out like this.

1 solution

1. Well, first thing I notice is that these are case sensitive.
So, if your text container has redux then it will not match (Redux from the skill_list).

2. You have some two word items such as "Operations Management".
However, since split() will split those on the space then they will be two items and will not match Operations Management in your text object. Instead will match Operations & Management (separately).

Basically, you need to know that your text list needs to split on "," so two-word items will match.


Here's some test code I used:
Python
text = "first,second,third,Java,Python,redux,Data Structures, yada,Team Management, Team Data"  

skill_list=['C', 'C++', 'Java', 'Python', 'Data Structures', 'HTML', 'CSS', 'SQL', 'MySQL', 'Machine Learning', 'ML', 'Deep Learning', 'NLP', 'Computer Vision', 'Numpy', 'Pandas', 'Tensorflow', 'Scikit-Learn', 'Pyteserract', 'OpenCV', 'BeautifulSoup', 'Big Data', 'Hadoop','Project Management', '.Net', 'Android Application Development', 'IST Testing', 'Oracle DB', 'JavaScript', 'Bootstrap React JS', 'Redux',
'QA Plan and Strategy',	'Operations Management', 'Automation Testing',	'Technology Planning', 'DMSC Process Audits', 'Delivery Management','QA/Test Management','Team Management', 'ETL Testing',	'UNQORK Product Testing', 'Angular JS', 'AWS', 'Configuration Management', 'Linux','Windows', 'Operating Systems', 'T-SQL', 'Automated Testing', 'Microsoft Azure', 'DevOps', 'SAP', 'GitHub', 'Cloud', 'Network Management','Cloud Infrastructure automation', 'Cloud Data migration', 'CloudData analytics', 'AWS security monitoring', 'Spring MVC', 'JDBC', 'Servlets',
'Hibernate']

sp_tx=text.split(",")
print (type(sp_tx))
print (len(sp_tx))

print (len(skill_list))
print (skill_list[4])

common_list = set(sp_tx).intersection(skill_list)
print (len(common_list))
print (common_list)
 
Share this answer
 
v4
Comments
Apoorva 2022 13-Sep-22 16:29pm    
Yes, I'm aware of those two issues, but even the words 'HTML' & 'CSS' aren't getting printed.

This line is from the text-->
• Good working knowledge on React Hooks, Redux, JavaScript, CSS, HTML.
Apoorva 2022 13-Sep-22 16:41pm    
My text is like this-->

Kty yu john Gmail: john@gmail.com
Mobile: + 3418124475647



Profile:


I have 3 year of experience in Front-End development and web applications using technologies

such as Html, CSS, JavaScript and Bootstrap React JS, Redux.



Summary:


• Experience in design and configuration for implementation, development, maintenance,
and support as a React.JS Developer to meet business needs.

• Good working knowledge on React Hooks, Redux, JavaScript, CSS, HTML.
• Developing new user-facing features using React.js
• Building reusable components and front-end libraries for future use.
• Strong proficiency in JavaScript, including DOM manipulation.
• Thorough understanding of React.js and its core principles
• Familiarity with newer specifications of ECMAScript
• A proactive learner for adopting emerging trends and addressing industry requirements to

achieve the organizational objectives.

• Good communication, presentation, and interpersonal skills
• Strong work ethics and commitment to work to achieve Client’s objectives.




Experience:


 Working as a Front-End Developer in yada Software Solutions Pvt Ltd

 January 2019 to Present.


Project Experience:


Project:


 Title : MediHost

 Environment : HTML, CSS3, JavaScript, Bootstrap, React JS, Redux

 Team Size 6

 Role : React.JS Developer

Description:


This is a MediHost application It is purely based on Helath care it is a Service based online
Application which provides delivering banking and Health Products and also Medical
Equipments at doorsteps it is one environment and having strong user management System. This
application Empowers the user Hierarchical Relationship.



Roles & Responsibilities:


 Responsible for understanding user requirements, designing and developing applications.

 Involved in development of web applications using JavaScript, HTML, CSS3, Bootstrap and
React JS, Redux.

 Developed front end of the dashboard applications like Sidebar, Navbar, Cards Sign Up, Log In



Forms Upload images and files.

 Maintain the State Mangement by Redux Libraries.


Technical Skills:


• Web Technologies : Html5, CSS3, Bootstrap, React-bootstrap
• Scripting language : JavaScript
• Libraries : React Js, Redux,

• Tools : Visual Studio Code

Project:



Title : SmartEdu

Environment : HTML, CSS3, JavaScript, Bootstrap, React JS

Team Size : 5

Role : UI Developer

Description:


One Stop for All School Activities. It is a React.js application where we build with several modules.
Each one of them has many modules such as activity module, student module, payment/purchase
module, dashboard with reports module, user management module. They offer educational ideas
beyond academics, content, voice modulation.


Roles & Responsibilities:



• Involved in development of web applications using JavaScript, HTML, CSS3, React JS and Media-

queries.

• Developed front end of the admin- dashboard applications like Side Navigation, Contact-Form,

Dropdowns.

• Developed a static website with fully responsive.


Education:


Declaration:


I hereby declare that all the details furnished above are true to the best of my knowledge and

belief.
Apoorva 2022 13-Sep-22 16:43pm    
I converted the content from a PDF file to text using 'Tika Parser' & my data/text turned out like this.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900