title: How to classify a string that belongs to a particular area using java?
body: <p><strong>A short intro</strong> <br>
  I had extracted a bunch of text from set of PDF files.. Those text are title of the document..</p>
  
  <p>My objective is to classify the titles based on the terms appearing on it. That is if the title contains <code>Car</code> then it must be classified as <code>automobile</code>.</p>
  
  <p><strong>Example for my objective</strong> <br></p>
  
  <p>Imagine the following titles: <br></p>
  
  <blockquote>
    <p>1) DISTRIBUTED MESH NETWORK <br>
       2) MONITORING A SELF-CONTAINED SERVER RACK SYSTEM <Br>
    3)SIDE PANEL FOR AN AUTOMOBILE <Br>
    4) LOCATION-BASED VEHICLE MESSAGING SYSTEM</p>
  </blockquote>
  
  <p>Now , the above mentioned title have to classified as </p>
  
  <blockquote>
    <p>1st title contains term Network , So classify as Networking <Br>
    2nd title contains term Server, So classify as Networking <Br>
    3rd title contains term automobile, So classify as automobile <br>
    4th title contains term vehicle , so classify as automobile <Br></p>
  </blockquote>
  
  <p>This is what I need . </p>
  
  <p><strong>My Works</strong> <Br></p>
  
  <p>To achieve my objective I created a index of terms in text files  for each category and matched it with a title .. if it contains a word in text files , then title get classified.</p>
  
  <p>For example </p>
  
  <p><code>Automobile.txt</code> have  <code>car , gear , wheel , clutch</code>. <Br>
  <code>networking.txt</code> have <code>server,IP Address,TCP , RIP</code></p>
  
  <p>This is the Algorithm:</p>
  
  <pre><code>String Classify (String title)
  {
   String area;
   if (compareWordsFrom ("Automobile.txt",title) == true ) area = "Auto";
   if (compareWordsFrom ("Netoworking.txt",title) == true ) area = "Networking";
   if (compareWordsFrom ("metels.txt",title) == true ) area = "Metallurgy";
   return area;
  }
  </code></pre>
  
  <p><strong>My Problem</strong> <br>
  My problem is , it is very difficult to find related words to build the index. That is , the field automobile have 1000 of related terms which difficult to find.  </p>
  
  <p>To be precise , building index of terms manually is a heart-breaking process.</p>
  
  <p><strong>My Need</strong> <br>
  I need an automated way for my work . Do Natural Language Processing  techniques able to  do  it. ? OR I is there is an ready-made library available ?</p>