Python Forum
Matching Data - Help - Dictionary
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Matching Data - Help - Dictionary
#1
Hello everyone...

I need to match two huge excel datasets. As a simple example, they look like this:

DataSetA: There is random text, and then a classification.

Text A - Classification A

Marruecos is beautiful in the summer - Tourism
Coca Cola sucks - Food
This computer was bought - Technology
The sun will not shine - Weather
The man is a not really a woman - Social
Who doesnt love cats? - Animals

DataSetB: There is text, but no classification. As you can see, there are words in the Text B than you find in Text A, for example Marruecos, Coca, Computers, Cats and etc. I need a formula or code, that says ,ok if you find in Text B the word Marruecos, go to table A, see where Marruecos is written, and bring me Tourism, and do the same for the following words.

Text B - Classification B

Marruecos is in africa - ?
Coca cola is not healthy ?
Every year there are new computers in the market - ?
Cats kill mice - ?
The number of man increased - ?
The sun is yellow - ?
Marruecos is in africa - ?

I would be really thankful
Reply
#2
How do you know "Marruecos" is an important word to match and not "Africa" or "is"? That is the problem you need to solve. Once you have that, looking up important words is simple.

This is a nice thread discussing finding the subject of a sentence. It is not an easy task.

https://stackoverflow.com/questions/2861...a-sentence
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [SOLVED] Concat data from dictionary? Winfried 4 1,738 Mar-30-2022, 02:55 PM
Last Post: Winfried
  Python, how to manage multiple data in list or dictionary with calculations and FIFO Mikeardy 8 2,620 Dec-31-2021, 07:47 AM
Last Post: Mikeardy
  Converting data in CSV and TXT to dictionary kam_uk 3 1,999 Dec-22-2020, 08:43 PM
Last Post: bowlofred
  Issue accessing data from Dictionary/List in the right format LuisSatch 2 2,224 Jul-25-2020, 06:12 AM
Last Post: LuisSatch
  problem coverting string data file to dictionary AKNL 22 6,471 Mar-10-2020, 01:27 PM
Last Post: AKNL
  Read csv file, parse data, and store in a dictionary markellefultz20 4 4,601 Nov-26-2019, 03:33 PM
Last Post: DeaD_EyE
  Organizing Data in Dictionary Ranjirock 3 2,646 Aug-27-2019, 02:48 PM
Last Post: Ranjirock
  Dictionary for Excel Data Ranjirock 0 25,531 Aug-18-2019, 05:26 PM
Last Post: Ranjirock
  Comaparing Float Values of Dictionary Against A Float Value & Pick Matching Key firebird 2 3,398 Jul-25-2019, 11:32 PM
Last Post: scidam
  How to ger matching rows data based on index columns SriRajesh 1 2,224 Mar-08-2019, 11:05 AM
Last Post: scidam

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020