I have a description of a product say mobile in this form -
"5.5" (13.97cm) full hd 1920 x 1080 pixels ips screen gorilla glass display with 401ppi resolution - 450 nits brightness & contrast ratio of 1000:1first phone with theatermax technology and dolby atmos surround sound over speakers13mp f2.2 primary camera with 5p lens element, dual led dual tone flash, 5mp front camera with 4p lens elementandroid v5.1 os with 1.3 ghz mediatek 6753 64-bit octa core processor, arm mali t720 gpu, 3 gb ddr3 ram, 16gb internal memory (expandable up to 128gb) and dual micro sim dual standby (4g+4g)3300mah lithium-ion battery with fast charger 2.0 providing talk-time of 29 hours"
I have to extract the important elements of the description and map it to keys like -
- Display size - 5.5
- Display Resolution - 1920 x 1080
- Sim type - Dual Sim
- Ram - 3gb
- Storage - 16gb.
I have a dictionary that maps key values pairs.
Example - {Ram:["3gb","3 GB","4 gb"],"Sim type":["Dual","Micro","Nano"]}
Can anyone suggest how to do this. I am coding in python. How to proceed it with NLTK. Should I use ngrams??? Any useful examples that uses self tagging will be helpful. All examples i see uses already defined tags like noun,person,organisation etc. I want to give my own dictionary as corpus and train the model so that it extracts the relevant key values pairs from the text.