7
$\begingroup$

Reposting here because someone correctly pointed out it is better suited for here.

So I have a bunch of titles of eBay listings. I want to extract product information from each title, so I can categorize the listings by product since these titles are coming from wide-ranging searches.

The are the following Titles:

  1. 5 PCS 3 Digits 0.56" NUMERIC DISPLAY 7 seg segment Common cathode
  2. 5 PCS LD-3361AS 3 Digits 0.36" NUMERIC DISPLAY 7 SEG COMMON CATHODE digit
  3. 6 x MAN71A Common Anode Red Led 7-Segment Display (6 pcs)
  4. Experiment Board Breadboard Circuit Board ZYJ - 60 White NEW

The format in which I want to extract the data is as follows:

For the 1st listing:

There are 5 pieces
It has 3 digits
It is of size .56"
It is 7 segments
It is numeric
It is cathode
It is a display

For the 2nd listing:

There are 5 pieces
It is of size .36" 
It is model LD-3361AS
It has 3 Digits
It is Numeric
It has 7 segments
It is cathode
It is a display

For the 3rd listing:

There are 6 pieces
It is brand MAN71A
it has 7 segments
It is Anode
It is a display

For the 4th listing:

It is New
It is a Breadboard
It is White
It is model ZYJ - 60

The reason I want to learn machine learning to do this is that it would make it very easy to just take those specifics and store it for later use and because it can adapt to any search and not just in a specific category. It would also be able to adapt to different items or formats in the title. I tried this with scikitlearn's kmeans, but it gave me a lot of overlap and just clustered them, rather than extract the details from it. What I want to do is have the program look at the title, identify specifics as what they refer to (i.e., size, color, brand, etc.) and extract the data. Ideally, this would be unsupervised learning, but as I write this, I start to realize that may be impossible to do with this. The part I'm stuck on is what to use to achieve this. Should I use NLTK? One of the classifiers from scikitlearn? Clustering?

$\endgroup$
5
  • 2
    $\begingroup$ Can't you use web mining approaches? $\endgroup$ Jan 10, 2018 at 19:38
  • $\begingroup$ What do you mean by that? $\endgroup$
    – Gorlan
    Jan 10, 2018 at 22:26
  • 1
    $\begingroup$ It's a complex task to get the desired outcome as the ad titles don't follow any standard format. for example number of pieces can be placed at the start or at the end or in the middle of the title. you need to handle it carefully. Now, in the example I stated to get the first sentence as number of pieces you need to maintain a dictionary like PIC,PICS,PCS,PIECES....etc. Then you need to extract the value which is present before it(assuming that number of pieces are written before PCS as given in your sample). I gave explanation only for 1 feature. Do let me know if you need more explanation. $\endgroup$
    – Toros91
    Jan 11, 2018 at 8:05
  • $\begingroup$ Are the four examples you give the only types of format there are in your dataset. Are there more formats you have to account for? $\endgroup$
    – grldsndrs
    Jan 11, 2018 at 20:33
  • $\begingroup$ @grldsndrs There are countless # of formats, unfortunately. And even then, those formats will always be changing as new data comes in. Which is what makes it harder to hard code in. But Toros91 explanation helps a lot. ty $\endgroup$
    – Gorlan
    Jan 11, 2018 at 21:32

1 Answer 1

3
$\begingroup$

Like Toros91 explained, it is a raw data format. You want to convert 5 PCS into There are 5 pieces. How does you know PCS means pieces? You have a link somewhere in your brain that tells this. You have to do the same in programming. Create a dictionary which tells the machine that wherever it encounters PCS in line, PCS means pieces (it can be a model name also, you have to take care of that). The number just before PCS is the value. All this you have to code manually. There is no shortcut here. And of course you have to use NLP to achieve your task.

Pre-Processing your raw data is the hard task, using ML algorithm on a formatted data is easy one.

$\endgroup$

Your Answer

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

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