0
$\begingroup$

Im looking for an algorithm that can deduct a set of rules based on a dataset of "training documents" that can be applied to classify a new unseen document. The problem is that I need these rules to be viewable by the user in the form of some string representation. For example, the algorithm found that documents have a minimum word count of 1000 and that there are 4 citations in each document. The key is that these rules must be deducted by a algorithm. An example of this in practice would be:

Document 1 contains 890 words and only 2 citations

I need it to return something like:

- You should add more words to make it better
- Add more citations to prove your point

$\endgroup$

2 Answers 2

0
$\begingroup$

It sounds like you have two issues. The first one is preprocessing and feature extraction. The second one is how to learn classification rules.

The second issue is the easier one to approach. There are a number of algorithms for learning classification rules. You could use a decision tree algorithm such as CART or C.4.5 but there are also rule induction algorithms like the CN2 algorithm. Both these types of algorithms can learn the types of rules you mention, however, rule induction based systems can usually be supplemented with hand crafted rules in a more straight forward way than decision tree based systems, while, unless my memory fails me, decision tree algorithms generally perform better on classification tasks.

The first issue is bit hairier. To recommend the types of changes you suggest you first need to extract the relevant features. There are pre-processors which perform part-of-speech tagging, syntactic parsing, named entity recognition etc. and if the citations follow a strict format, I guess a regular expression could perhaps solve the problem, but otherwise you have to first train a system to recognize and count the number of citations in a text (and the same for any other non-trivial feature). Then you can pass the output of this feature extraction system into the classification system. However, on reading your question again I'm unsure whether this problem might already be solved in your case?

$\endgroup$
3
  • $\begingroup$ For the first issue of preprocessing and feature extraction, would preprocessors be able to find if a document is not detailed enough. For example, I have a document that is not very detailed would the the algorithm be able to output say You should add a little more detail $\endgroup$ Dec 22, 2016 at 22:07
  • $\begingroup$ Difficult to say. I don't know of any established measure of level of detail but perhaps there is one in the Coh-Metrix feature set. Otherwise, I guess you could try to define a measure akin to lexical density (number of content words divided by total number of words) which represents the level of detail of a document. I'm a bit too tired to come up with a suggestion right now but perhaps lexical density could serve as a proxy. $\endgroup$ Dec 22, 2016 at 22:56
  • $\begingroup$ No problem, do look up coh-metrix though, there might be a lot of interesting features for your problem there. It sounds like you're working on a really interesting application! /guy doing research in readability analysis $\endgroup$ Dec 22, 2016 at 23:11
0
$\begingroup$

I think a simplest way is like this: convert the document to a vector like "bag of words" or "n-grams", then apply algorithm which can be used to derive rules Decision tree or LEM2.

$\endgroup$
3
  • $\begingroup$ Can these rules be printed out to the user? @luosha865 $\endgroup$ Dec 22, 2016 at 4:15
  • $\begingroup$ yes , algorithm like Decision tree or LEM2 can generate human readable rules. $\endgroup$
    – luosha865
    Dec 22, 2016 at 7:26
  • $\begingroup$ Wouldn't using a bag of words vector representation only take into account the words of the document so it wouldn't be able to find for example 2 citations is not enough @luosha865 $\endgroup$ Dec 22, 2016 at 13:50

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.