I am new to machine learning and Natural Language Processing (NLP). I am trying to identify which brand, product name, dimension, color, ... a product has from its product title. That is, from

'Sony ZX Series Wired On-Ear Headphones, Black MDR-ZX110'

I want to extract

'brand=''Sony''', 'item=''Headphones''', 'color=''Black''', 'model_number=''MDR-ZX110'''.

I understand that this amounts to something like custom Named-Entity Recognition.

The very minimum of what my algorithm should do is identify the 'item' attribute value, i.e. it should recognize that the above example refers to ''Headphones''.

My dataset contains product titles such as the one above with appropriate attribute-value pairs scraped from e-commerce websites.

Which deep learning algorithm is best-suited to solve this problem? Which type of input (embeddings?), neural network model, output layer should I choose to start?


1 Answer 1


I am currently working on a similar project but limited only to brand detection in product titles, the task is a named entity recognition task and can be solved by different models, the most used ones are BI-LSTM + CRF (Bidirection LSTM with a CRF layer on top). You could try to use spaCy for the task which has a nice documentation and good workflow to train NER models. Or you can build the model yourself using tensorflow (here is a good tutorial) or PyTorch (there is a tutorial here)

Obviously, you will need annotated data to train your models.

Here are some papers that might help you get some insights (at least they did for me) :


You can find my project which is similar to yours here with pretrained models: https://github.com/annis-souames/brand-ner

Here's a second project on Github : https://github.com/maciej-cecot/brand-detection

  • $\begingroup$ What are the pros and cons of using spaCy to train a BiLSTM-CRF model over TensorFlow or PyTorch? Which input embedding is useful for such a model? $\endgroup$
    – theteanjk
    Jan 17, 2022 at 15:54
  • 1
    $\begingroup$ spaCy is much easier to use and train models than tensor flow or PyTorch, if you don't have much experience in DL, I recommend to go with spaCy or Flair as they make things much easier. I updated the original questions to the project I've been working on and some links $\endgroup$
    –  Annis99
    Jan 17, 2022 at 20:54

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.