languages
Class Language

java.lang.Object
  |
  +--languages.Language
Direct Known Subclasses:
English, Italian

public abstract class Language
extends java.lang.Object

Interfaccia per la gestione delle lingue. Le classi che implementano questa interfaccia incapsulano le parti dell'algoritmo dipendenti dalla lingua.


Constructor Summary
Language(java.lang.String server, int port)
          Initialize the port and server attributes.
 
Method Summary
abstract  java.util.Vector[] generalize(java.util.Vector[] term)
          constructs a less specific noun phrase by eliminating adjectives or other terms which specialize it
abstract  TabellaIntorni getNeighborhoods()
           
 int getPort()
           
 java.lang.String getServer()
           
abstract  boolean isAdjOrNoun(java.lang.String tag)
           
 boolean isInterestingTerm(java.lang.String term)
           
abstract  boolean mainWord(int i, int n)
           
abstract  java.lang.String morph(java.lang.String word)
          perform the morphing of the string.
abstract  java.util.Vector parseNounPhrases(java.util.Vector words, java.util.Vector tags, java.util.Vector lemmas, java.util.Vector abstr)
          analyzes a sentence described by a series of tags and lemmas and returns a vector of phrases (each one a vector of strings representing a noun phrase).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Language

public Language(java.lang.String server,
                int port)
Initialize the port and server attributes.
Method Detail

parseNounPhrases

public abstract java.util.Vector parseNounPhrases(java.util.Vector words,
                                                  java.util.Vector tags,
                                                  java.util.Vector lemmas,
                                                  java.util.Vector abstr)
analyzes a sentence described by a series of tags and lemmas and returns a vector of phrases (each one a vector of strings representing a noun phrase). The Vector abstr if filled with the noun-phrases for the abstract.

generalize

public abstract java.util.Vector[] generalize(java.util.Vector[] term)
constructs a less specific noun phrase by eliminating adjectives or other terms which specialize it

morph

public abstract java.lang.String morph(java.lang.String word)
perform the morphing of the string.

getNeighborhoods

public abstract TabellaIntorni getNeighborhoods()
Returns:
the table of neighbors for each term in the category

isInterestingTerm

public boolean isInterestingTerm(java.lang.String term)
Returns:
true il the term is present on the neighborhoods.

getPort

public int getPort()
Returns:
the port for server.

getServer

public java.lang.String getServer()
Returns:
the server name.

isAdjOrNoun

public abstract boolean isAdjOrNoun(java.lang.String tag)

mainWord

public abstract boolean mainWord(int i,
                                 int n)
Returns:
true if the i-th word is the main term in a sentence long n words