1
$\begingroup$

Edit

Thanks to the answer of @pcko1, I understand that I should use data augmentation to make my model resilient to order of data points.

Clarification after the answer of @Icrmorin : My problem is actually more complex than just finding bullets. I also need to find title, order text appropriately (think 2-columns PDF), find header/footer, etc...
I am currently trying a rule-based approach, and it was working well so far. But as the number of PDF format I need to handle grow, the complexity of the code grow as well, and I'm reaching a point where PDF formats have opposite features and can't be handled by the same code.
I was hoping the machine learning approach might solve this issue and works well for any format.

According to the answer of @mariq vlahova, it seems there is no name for this kind of task ? Just use LSTM ?

end of edit


I'm looking for the name of a task, in order to search more literature about the subject.

The best I can describe this task is given in the title itself...

Basically I have data points with several features each, and I need to classify each of these data points, but not independently. However the order does not (or should not) matter.


Example

For example I have 3 data points [D1, D2, D3], and I want to classify is as [True, False, False].

These data points are dependent, ie changing 1 data point might alter the result of other as well :
[D1, D2', D3] might be classified as [True, True, True].

Also, the order does not matter (that's why I wrote "without the time dimension"):
If [D1, D2, D3] is classified as [True, False, False],
then [D2, D3, D1] should be classified as [False, False, True].


Context

A bit more context... Basically I want to classify PDF content, as being a bullet point or not.

So I want to parse my PDF file, extract chunks of text along with additional information (font size, position, etc...), and classify these chunks as bullet or not bullet.

But we can't classify each chunk independently. Consider the following example :

...End of previous paragraph

1. This is a title

Beginning of next paragraph...

In this case, 1. This is a title should not be classified as bullet. But :

1. This is a title

2. This is a second title

3. This is a third title

In that case, 1. This is a title should be classified as bullet.

I need to find literature about this problem but I don't even know the name of the task...

$\endgroup$
3
$\begingroup$

Honestly it seems you are quite far from what would need a supervised vision approach. I suggest you to try a simple non-ML approach first : extract text with a standard library then just label what would count as a 'bullet' then check if there is more than one in a row. This might just work and if it doesn't it will help you understand why.

Going the whole OCR way would imply a lot of pdf annotation for a gain that is not really clear without trying a simple benchmark.

Ps: if you want to deal with text, the relevant field is Natural Langage Processing not time-series.

$\endgroup$
1
  • $\begingroup$ Thanks for the answer ! Actually I need a bit more than just bullet. I also need to find if it's a title, where paragraphs starts and stops, finding header/footer, etc... I'm posting this question because I already tried a rule-based approach, and the code complexity is growing and growing... Also I have various PDF formats, all of them can't be treated by the same code. So I was wondering if machine learning can help me here. $\endgroup$
    – Astariul
    Oct 20 '20 at 23:39
1
$\begingroup$

What you are looking for is training a classifier with data augmentation.

In the context of image classification, this may refer to changing the pose of the object by skewing or rotating the image.

In the context of text classification, this can be imagined as classifying different versions of the same sentence with an alternating word sequence (some languages allow it more than others, e.g. the Greek language allows it whereas the German language is stricter).

More interestingly, this has found groundbreaking impact in the context of de novo drug design, where molecules are described by alphanumerical literals (strings) which can then be augmented by changing the sequence of their constituting characters in a chemically meaningful way. This is called randomization but essentially it is a remix of the original string and, thus, data augmentation.

Finally, after you have decided on a data augmentation strategy, you apply it to your training dataset. All augmented versions of a data point maintain the same original label. Then, you are ready to train any classifier, such as a Random Forest or a Support Vector Machine on augmented and tokenized text data.

$\endgroup$
1
  • $\begingroup$ I see... Thanks for the answer ! I understand how data augmentation would solve my problem with the order of elements. But (correct me if I'am wrong) I still have the problem with dependency between data points. Random Forest or SVM handle data point one by one, right ? $\endgroup$
    – Astariul
    Oct 20 '20 at 23:36
0
$\begingroup$

If i understand you right what you trying to achieved is Text Classification using Context Information.Also i assume that you have target column ,so you need to used supervised learning(please correct me if my assumptions are wrong :) ) For such cases the best is to use recurrent neural networks like LSTM for example.Please check this https://www.kaggle.com/kredy10/simple-lstm-for-text-classification ,because i think it is very similar to your case.

$\endgroup$
2
  • $\begingroup$ You're right ! But in my case I don't want to apply the LSTM directly on raw text. I was hoping to extract features from text (position, does it starts with a digit, etc...) and use a machine learning approach to do classification. But can I use LSTM on features, not text ? $\endgroup$
    – Astariul
    Oct 20 '20 at 23:42
  • $\begingroup$ Yes.You can use your features with LSTM .The feature selection will be very crutial for the end result in that case ,so it will be good to generate more features and use feature selection approch after this -SVM is good tool for that purpose.Check natural language processing techniques for feature generation. $\endgroup$ Oct 21 '20 at 8:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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