org.hops.lg.pg
Class lg_util

java.lang.Object
  extended by org.hops.lg.pg.lg_util

public class lg_util
extends java.lang.Object

lg_util.java This class is used by the LanguageGeneator to load the messages and matching files Contains the structure of the language descritor


Nested Class Summary
 class lg_util.HashIndex
          this class is for indexing rules and patterns by type and name
 class lg_util.LG_Container
          Class used to store the phrases of - concepts - attributes - lexic
 class lg_util.LG_LD
          Stores the hashmap of concepts, attributes, lexicon, patterns, rules and speechacts for ONE language
 class lg_util.LG_Mark
          a mark stores the name of the mark and the type
 class lg_util.LG_MarksList
          this class stores the list of marks for a rule or pattern form
 class lg_util.LG_ObjectList
          Class used to store the list of Marks of patterns and rules
 class lg_util.MarkType
          MarkType is the type of the mark that represents a concept, attribute, lexic, patter, value of phrase
 class lg_util.XMLTags
          XMLTags the used tags
 
Constructor Summary
lg_util()
           
 
Method Summary
static java.lang.String CapitalLetters(java.lang.String phr)
          Check upper cases.
static java.lang.String CkeckPhrasePunc(java.lang.String phr)
          Check the phrases punctuaction.
 lg_util.HashIndex getNewHashIndex()
          HashIndex factory
 lg_util.LG_Container getNewLG_Container()
          LG_Container factory
 lg_util.LG_LD getNewLG_LD()
          LG_LD factory
 lg_util.LG_Mark getNewLG_Mark()
          LG_Mark factory
 lg_util.LG_MarksList getNewLG_MarksList()
          LG_MarksList factory
 lg_util.LG_ObjectList getNewLG_ObjectList()
          LG_ObjectList factory
static int getOrd(java.lang.String ordName)
          return the num of ord for the ordername
static boolean isBackEndDependant(java.lang.String attr_name)
          returns true if the attribute name is title or location
static java.util.HashMap putAllHash(java.util.HashMap phrases, java.util.HashMap phrases_list)
          put the phrases list hasmap into the phrases hashmap
static java.util.ArrayList ShiftMark(java.util.ArrayList marks)
          return the arraylist without the first element
static java.util.ArrayList TreureTags(java.util.ArrayList values)
          Remove the tags that appear in the list of results.
static java.lang.String TreureTags(java.lang.String str)
          This function returs a clean sentence that originary had xml tags.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

lg_util

public lg_util()
Method Detail

isBackEndDependant

public static boolean isBackEndDependant(java.lang.String attr_name)
returns true if the attribute name is title or location


TreureTags

public static java.util.ArrayList TreureTags(java.util.ArrayList values)
Remove the tags that appear in the list of results. This is necessary because the tags are in values the BE


TreureTags

public static java.lang.String TreureTags(java.lang.String str)
This function returs a clean sentence that originary had xml tags. So, this funciton removese xml tags of a sentence

Parameters:
str - the sentence to clean
Returns:
the document cleaned

CkeckPhrasePunc

public static java.lang.String CkeckPhrasePunc(java.lang.String phr)
Check the phrases punctuaction.

Parameters:
phr - the sentence to check
Returns:
the same sentence modified

CapitalLetters

public static java.lang.String CapitalLetters(java.lang.String phr)
Check upper cases. after dot after ?! after żĄ first capital letter " : " " ' "


putAllHash

public static java.util.HashMap putAllHash(java.util.HashMap phrases,
                                           java.util.HashMap phrases_list)
put the phrases list hasmap into the phrases hashmap

Parameters:
phrases_list - the hashmap src
phrases - the hashmap destination
Returns:
the new hashmap

getOrd

public static int getOrd(java.lang.String ordName)
return the num of ord for the ordername

Parameters:
ordName - the name of the order: Open, Mid, Directive
Returns:
the num of order - Open -> 0 - Mid -> 1 - Directive -> 2 - other -> 3

getNewLG_LD

public lg_util.LG_LD getNewLG_LD()
LG_LD factory


getNewLG_Container

public lg_util.LG_Container getNewLG_Container()
LG_Container factory


getNewHashIndex

public lg_util.HashIndex getNewHashIndex()
HashIndex factory


getNewLG_ObjectList

public lg_util.LG_ObjectList getNewLG_ObjectList()
LG_ObjectList factory


getNewLG_MarksList

public lg_util.LG_MarksList getNewLG_MarksList()
LG_MarksList factory


getNewLG_Mark

public lg_util.LG_Mark getNewLG_Mark()
LG_Mark factory


ShiftMark

public static java.util.ArrayList ShiftMark(java.util.ArrayList marks)
return the arraylist without the first element