My problem is

I want to build a one class SVM classifier to identify the nouns/aspects from test file. The training file has list of nouns. The test has list of words.

This is what I've done:

I'm using Weka GUI and I've trained a one class SVM(libSVM) to get a model.

Now the model classifies those words in test file that the classifier identified as nouns in the generated model. Others are classified as outliers. ( So it is just working like a look up. If it is identified as noun in trained model, then 'yes' else 'no')

So how to build a proper classifier?. ( I meant the format of input and what it information it should contain?)


  • I don't give negative examples in training file since it is one class.

  • My input format is arff

  • Format of training file is a set of word,yes

  • Format of test file is a set of word,?


EDIT My test file will have noun phrases. So my classifier's job is to get the nouns words from candidates in test file.


1 Answer 1


Lot of fundamental issues here. The problem/task is ill formed as a machine learning problem and is also ill formed as a natural language processing problem.

Below I have given some background of ML and NLP to help you understand. Hope it helps.


  • it is difficult because of ambiguity in meaning
  • ambiguity is at various levels and of multiple kinds in NL making it very difficult to interpret using rules based patterns

    • Words have multiple meanings
    • Sentences have multiple meanings
    • The same word can be verb noun adjective etc
  • examples(respectively)

    • cricket : could be insect or the game
    • he saw a boy with a telescope : could mean the viewer had the telescope or the viewed had a telescope
    • running : could be verb or noun


  • though ambiguous there are still some rules which help remove/solve ambiguity with HIGH CHANCES of success
  • it is chances because the rules apply majority of times but not all the times. hence give right results majority of times but not all the times.
  • example rules 1
    • if the word cricket is in a document and names of cricket players appear in the same document then the usage of word cricket is in sense of the sport/game and not as an insect
    • the above will fail if a leading cricket player has same name as that of a zoologist who studies insect
    • chances of most cricket players, cricket (as a sport) terminology and words being same to that of cricket(as an insect) is very less hence mostly we will get the right sense of cricket but will fail sometimes
  • example rules 2
    • study of grammatical structure of english sentences will tell you that some pairs of grammatical formations are more common than other
      • a continous verb following a present tense verb is common
      • hence chances of 'running' being a verb when followed by word 'is' is more than 'running' being a noun
  • now the most important part : there are rules but
    • such rules are very large in number to list down and code up
    • most rules don't apply all the times
    • different rules give different levels of accuracy based on how commonly they are correct


  • we annotate large chunks of texts with information which we believe will make some rules
  • we then show the processed text to a machine learning algorithm
  • the algorithm comes up with some statistical, probabilistic formulations to identify, rank and extract rules which give the best results in most cases
  • the algorithm is then used to solve for ambiguity in test data


  • your input file is a look up file hence what the classifier has learnt is a look up
  • your input file is wrong as no word can just be a noun or a verb, if that was the case there was no use of ML/NLP
  • if your input file has multiple instances of same word tagged as other things too, such as verbs and adjectives it won't help as you haven't specified anything about what is more probable and what is less probable and anything in context which can help anyone disambiguate. Infact, if I show that file to a human he too will fail to udnerstand the rules and to the classification


  • read up about bag of words and semantic and dependency parsing to understand how ML and NLP are used.

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.