4
$\begingroup$

I would like to develop some kind of model/algorithm that allows me to extract the characteristics of a given product name. (let's say the brand, model and color).

I am looking for a solution similar to the one offered by MonkeyLearn and its model Laptop Feature Extract.

For example:

Given the item "Apple iPhone 6s, 64GB Silver", It should compute:

{
  brand: "iPhone",
  model: "6s",
  capacity: "64Gb",
  color: "Silver"
}

Any suggestions will be appreciated. Thank you.

$\endgroup$
1

1 Answer 1

2
$\begingroup$

What you need to look for is called "Named Entity recognition". From Wikipedia

Named-entity recognition (NER) (also known as entity identification, entity chunking and entity extraction) is a subtask of information extraction that seeks to locate and classify named entity mentions in unstructured text into pre-defined categories such as the person names, organizations, locations, medical codes, time expressions, quantities, monetary values, percentages, etc.

There are already trained models for that, but most of them are for generic usage. For example in Python

import spacy

nlp = spacy.load('en_core_web_sm')
doc = nlp('European authorities fined Google a record $5.1 billion on Wednesday for abusing its power in the mobile phone market and ordered the company to alter its practices')
print([(X.text, X.label_) for X in doc.ents])

The output is

[('European', 'NORP'), 
('Google', 'ORG'), 
('$5.1 billion', 'MONEY'), 
('Wednesday', 'DATE')]

Source of code: TowardsDataScience

In your case, you have to either train an NER yourself for phone specifications or find one that is available in public.

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.