Answers.Body: <p>In this problem, you can also use NER models in order to tag those numbers as Width, Height,... . You can also fine-tune a DistilBert model for your task.</p>
  <p>if you want to train NER model by tok2vec you can use:
  <a href="https://spacy.io/usage/training" rel="nofollow noreferrer">Spacy Library</a></p>
  <p>for fine-tuning DistilBERT you can use this.
  <a href="https://huggingface.co/transformers/model_doc/distilbert.html" rel="nofollow noreferrer">Hugging Face</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-12-04T15:59:50.033Z
Answers.Text: Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer).
Answers.UserDisplayName: Community
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-12-04T15:30:58.560Z
Answers.LastActivityDate: 2021-12-04T18:17:48.493Z
Answers.LastEditDate: 2021-12-04T18:17:48.493Z
Answers.UserDisplayName: Seyed Moein Ayyoubzadeh
Body: <p>I'm trying to process product data for an e-commerce platform. The goal is to understand products' size.</p>
  
  <p>Just to show you some examples on how messy product dimension description is:</p>
  
  <pre><code>Overall Dimensions: 66 in W x 41 in D x 36 in H
  Overall: 59 in W x 28.75 in D x 30.75 in H
  92w 37d 32h",
  86.6 in W x 33.9 in D x 24 in H
  W: 95.75\" D: 36.5\" H: 28.75\"",
  W: 96\" D: 39.25\" H: 32\"",
  "118\"W x 35\"D x 33\"T.",
  "28 L x 95 W x 41 H"
  "95\" W x 26.5\" H x 34.75\" D"
  "98\"W x 39\"D x 29\"H"
  "28\" High x 80\" Wide x 32\" Deep"
  
  </code></pre>
  
  <p>Now assume that the product dimension description is short &lt; 60 characters, I trained a two layer bidirectional LSTM, which can handle this task perfectly.</p>
  
  <p>But the problem is, the above dimension is usually embedded in a long context (as a part of the product description). How can I extract the useful information from the long context and understand it? My LSTM can only accept context size of 60.</p>
  
  <p>What language model is more suitable for this?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-05-11T17:17:04.930Z
Comments.Text: Why can you only train an LSTM with a maximum context of 60?
Comments.UserDisplayName: Mathias Müller
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-12-05T20:53:05.867Z
Comments.Text: I would also use (in addition of LSTM) some symbolic AI approach, expert-system like (e.g. [RefPerSys](http://refpersys.org/)....)
Comments.UserDisplayName: Basile Starynkevitch
Tags: <natural-language-processing><long-short-term-memory>
Title: Which NLP model to use to handle long context?
UserDisplayName: Bill Yan
ThreadText: # Which NLP model to use to handle long context?
  
  (Asked by: username_0 on 2020-05-07)
  
  I'm trying to process product data for an e-commerce platform. The goal is to understand products' size.
  Just to show you some examples on how messy product dimension description is:
  Overall Dimensions: 66 in W x 41 in D x 36 in H
  Overall: 59 in W x 28.75 in D x 30.75 in H
  92w 37d 32h",
  86.6 in W x 33.9 in D x 24 in H
  W: 95.75\" D: 36.5\" H: 28.75\"",
  W: 96\" D: 39.25\" H: 32\"",
  "118\"W x 35\"D x 33\"T.",
  "28 L x 95 W x 41 H"
  "95\" W x 26.5\" H x 34.75\" D"
  "98\"W x 39\"D x 29\"H"
  "28\" High x 80\" Wide x 32\" Deep"
  
  
  Now assume that the product dimension description is short < 60 characters, I trained a two layer bidirectional LSTM, which can handle this task perfectly.
  But the problem is, the above dimension is usually embedded in a long context (as a part of the product description). How can I extract the useful information from the long context and understand it? My LSTM can only accept context size of 60.
  What language model is more suitable for this?
  
  **Tags:** natural-language-processing, long-short-term-memory
  > **Comments:**
  > **username_1**: Why can you only train an LSTM with a maximum context of 60?  
  > **username_2**: I would also use (in addition of LSTM) some symbolic AI approach, expert-system like (e.g. [RefPerSys](http://refpersys.org/)....)  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2021-12-04. Score: 1
  
  In this problem, you can also use NER models in order to tag those numbers as Width, Height,... . You can also fine-tune a DistilBert model for your task.
  
  if you want to train NER model by tok2vec you can use:
  [Spacy Library](https://spacy.io/usage/training)
  
  for fine-tuning DistilBERT you can use this.
  [Hugging Face](https://huggingface.co/transformers/model_doc/distilbert.html)
  
  > **Comments:**
  > **username_4**: Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer).  
  
  ---
  
  