semeval.mapping
Class LUChecker

java.lang.Object
  extended by semeval.mapping.LUChecker

public class LUChecker
extends java.lang.Object

LUChecker provides several methods to process the Semlink and PropBank data.

Author:
Fabian Shirokov

Constructor Summary
LUChecker(java.lang.String[] corporaList, boolean useTypes)
          Default constructor that takes a list of Salsa corpora and 'useTypes' as arguments.
 
Method Summary
 boolean correspondsToFrame(FrameLemmaPairPB pairPB, java.lang.String fnFrame)
          Checks via Semlink if a PropBank-Roleset corresponds to a given FrameNet frame.
 java.util.ArrayList<FrameLemmaPairFN> getAllFNPairs()
          Returns a list of all FrameLemmaPairFN elements that have been found in the given corpora.
 FrameLemmaPairPB getPBDirectlyOf(FrameLemmaPairFN pairFN)
          Returns a FrameLemmaPairDB if there is only one PropBank roleset for the given lemma.
 java.util.ArrayList<FrameLemmaPairPB> getPBOf(FrameLemmaPairVN pairVN)
          Returns the list of FrameLemmaPairPB elements that correspond to the given FrameLemmaPairVN element.
 java.util.ArrayList<FrameLemmaPairPB> getPBOverNombankAndVerbnet(FrameLemmaPairFN pairFN)
          Returns the list of FrameLemmaPairPB elements that have been retrieved over nombank and semlink (using nombank first, then verbnet).
 java.util.ArrayList<FrameLemmaPairPB> getPBOverNombankDirectly(FrameLemmaPairFN pairFN)
          Returns the list of FrameLemmaPairPB elements that have been retrieved directly over nombank.
 java.lang.String getPosOf(FrameLemmaPairFN pairFN)
          Returns the POS-Tag of a FrameLemmaPair, e. g.
 boolean getUseTypes()
          Returns the value of 'useTypes'.
 java.util.ArrayList<FrameLemmaPairVN> getVNOf(FrameLemmaPairFN pairFN)
          Returns the list of FrameLemmaPairVN elements that correspond to the given FrameLemmaPairFN element.
 boolean isInFN12(FrameLemmaPairFN pair)
          This returns true if the given FrameLemmaPairFN exists in the FrameNet release 1.2.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LUChecker

public LUChecker(java.lang.String[] corporaList,
                 boolean useTypes)
          throws org.xml.sax.SAXException,
                 javax.xml.parsers.ParserConfigurationException,
                 java.io.IOException
Default constructor that takes a list of Salsa corpora and 'useTypes' as arguments. The LUs will be extracted out of those corpora.

Parameters:
corporaList - Includes a list of the file names of the corpora to be parsed (Those corpora to extract the LUs from, like e. g. 'tigerchen_merged.xml').
useTypes - This is true if you want to regard 'types' of LUs, not 'instances' (e. g. the LU Abounding_with<->dotted.a can have several instances, but only one type).
Throws:
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
java.io.IOException
Method Detail

correspondsToFrame

public boolean correspondsToFrame(FrameLemmaPairPB pairPB,
                                  java.lang.String fnFrame)
Checks via Semlink if a PropBank-Roleset corresponds to a given FrameNet frame. (going from PropBank over VerbNet to FrameNet)


getAllFNPairs

public java.util.ArrayList<FrameLemmaPairFN> getAllFNPairs()
Returns a list of all FrameLemmaPairFN elements that have been found in the given corpora.


getPBDirectlyOf

public FrameLemmaPairPB getPBDirectlyOf(FrameLemmaPairFN pairFN)
Returns a FrameLemmaPairDB if there is only one PropBank roleset for the given lemma. Otherwise, it will return null. This method uses only PropBank, without looking at the Semlink data.

Parameters:
pairFN -
Returns:

getPBOf

public java.util.ArrayList<FrameLemmaPairPB> getPBOf(FrameLemmaPairVN pairVN)
Returns the list of FrameLemmaPairPB elements that correspond to the given FrameLemmaPairVN element. This is done by evaluating the Semlink data.

Parameters:
pairVN -
Returns:

getPBOverNombankAndVerbnet

public java.util.ArrayList<FrameLemmaPairPB> getPBOverNombankAndVerbnet(FrameLemmaPairFN pairFN)
Returns the list of FrameLemmaPairPB elements that have been retrieved over nombank and semlink (using nombank first, then verbnet).


getPBOverNombankDirectly

public java.util.ArrayList<FrameLemmaPairPB> getPBOverNombankDirectly(FrameLemmaPairFN pairFN)
Returns the list of FrameLemmaPairPB elements that have been retrieved directly over nombank.


getPosOf

public java.lang.String getPosOf(FrameLemmaPairFN pairFN)
Returns the POS-Tag of a FrameLemmaPair, e. g. "V" or "N". (as defined in frames1.2.xml)

Parameters:
pairFN -
Returns:

getUseTypes

public boolean getUseTypes()
Returns the value of 'useTypes'.


getVNOf

public java.util.ArrayList<FrameLemmaPairVN> getVNOf(FrameLemmaPairFN pairFN)
Returns the list of FrameLemmaPairVN elements that correspond to the given FrameLemmaPairFN element. This is done by evaluating the Semlink data.

Parameters:
pairFN -
Returns:

isInFN12

public boolean isInFN12(FrameLemmaPairFN pair)
This returns true if the given FrameLemmaPairFN exists in the FrameNet release 1.2.