|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.llnl.ontology.mapreduce.table.WordNetEvidenceTable
public class WordNetEvidenceTable
This class documents the schema of the WordNet Evidence table. Only word pairs where both terms exist in word net should be entered into the table.
Field Summary | |
---|---|
static String |
ALL_CORPORA
A marker to request all corpora types when scanning. |
static String |
CLASS_CF
The column family name for the class family. |
static String |
CLUSTER_SIMILARITY
The column family name for the cluster based similarity column family. |
static String |
COSINE_SIMILARITY
The column family name for the cosine based similarity column family. |
static String |
COUSIN_EVIDENCE
The column name for the coordinate evidence class. |
static String |
DEPENDENCY_FEATURE_CF
The column family name for the dependency features. |
static String |
DEPENDENCY_PATH_ANNOTATION_NAME
The annotation name for dependency path counts. |
static String |
EUCLIDEAN_SIMILARITY
The column family name for the euclidean based similarity column family. |
static String |
HYPERNYM_EVIDENCE
The column name for the hyernym evidence class. |
static String |
KL_SIMILARITY
The column family name for the kl-divergence based similarity column family. |
static String |
LIN_SIMILARITY
The column family name for the Lin based similarity column family. |
static String |
LSH_CLUSTER_SIMILARITY
The column name for clusters of similiarity lists generated via Locality Sensitive Hashing. |
static String |
NOUN_PAIR_CF
The column family name for the noun pair for each row. |
static String |
NOUN_PAIR_COLUMN
The column name for the noun pair. |
static String |
SIMILARITY_CF
The column family name for any similarity measurements between two noun pairs. |
static String |
TABLE_NAME
table name for this schema |
Constructor Summary | |
---|---|
WordNetEvidenceTable()
|
Method Summary | |
---|---|
String |
classColumnFamily()
Returns the string name of the class column family. |
byte[] |
classColumnFamilyBytes()
Returns the name of the class column family as a byte array. |
void |
close()
Closes the connection to the document reader. |
String |
cousinColumn()
Returns the column name for cousin class labels. |
byte[] |
cousinColumnBytes()
Returns the column name for cousin class labels as a byte array. |
void |
createTable()
Creates a new instance of the HTable represented by this GenericTable |
void |
createTable(org.apache.hadoop.hbase.client.HConnection connector)
Creates a new instance of the HTable represented by this GenericTable |
String |
dependencyColumnFamily()
Returns the string name of the dependency path column family. |
byte[] |
dependencyColumnFamilyBytes()
Returns the name of the dependency path column family as a byte array. |
Counter<String> |
getDependencyPaths(org.apache.hadoop.hbase.client.Result row)
Returns a new map that contains all of the dependency path counts, regardless of their source. |
Counter<String> |
getDependencyPaths(org.apache.hadoop.hbase.client.Result row,
String source)
Returns a map that contains all of the dependency paths associated with a single noun pair. |
SynsetRelations.HypernymStatus |
getHypernymStatus(org.apache.hadoop.hbase.client.Result row)
Retrieves the SynsetRelations.HypernymStatus for the given Result . |
String |
hypernymColumn()
Returns the column name for hypernym class labels. |
byte[] |
hypernymColumnBytes()
Returns the column name for hypernym class labels as a byte array. |
Iterator<org.apache.hadoop.hbase.client.Result> |
iterator(org.apache.hadoop.hbase.client.Scan scan)
Returns an iterator over all of the rows accessible from this GenericTable . |
StringPair |
nounPair(org.apache.hadoop.hbase.client.Result row)
Returns a StringPair for the noun pair held in the given Result . |
void |
putDependencyPaths(String word1,
String word2,
String source,
Counter<String> pathCounts)
Stores the dependency path counts gathred from the source corpus
using the provided Put object. |
void |
putHypernymStatus(org.apache.hadoop.hbase.io.ImmutableBytesWritable key,
SynsetRelations.HypernymStatus status)
Stores the SynsetRelations.HypernymStatus using the given key . |
void |
setupScan(org.apache.hadoop.hbase.client.Scan scan)
Initializes a Scan such that it will request whatever columns and
column families are neccesary for processing as determined by the table
type. |
void |
setupScan(org.apache.hadoop.hbase.client.Scan scan,
String corpusName)
Initializes a Scan such that it will request columns and
column families are neccesary for extracting the raw document text,
dependency trees, and document source information from the specified
corpusName . |
org.apache.hadoop.hbase.client.HTable |
table()
Returns the HTable instance attached to this GenericTable . |
String |
tableName()
Returns the name of the HBase Table that this GenericTable
represents. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String ALL_CORPORA
public static final String TABLE_NAME
public static final String NOUN_PAIR_CF
public static final String NOUN_PAIR_COLUMN
public static final String DEPENDENCY_FEATURE_CF
public static final String CLASS_CF
public static final String HYPERNYM_EVIDENCE
WordNetEvidence#HypernymStatus
to read covert values in this column to
the appropriate enum.
public static final String COUSIN_EVIDENCE
Integer.MAX_VALUE
signifies that the common ancesstor is beyond a
particular depth, most likely 7.
public static final String SIMILARITY_CF
public static final String CLUSTER_SIMILARITY
public static final String LSH_CLUSTER_SIMILARITY
public static final String COSINE_SIMILARITY
public static final String EUCLIDEAN_SIMILARITY
public static final String KL_SIMILARITY
public static final String LIN_SIMILARITY
public static final String DEPENDENCY_PATH_ANNOTATION_NAME
Constructor Detail |
---|
public WordNetEvidenceTable()
Method Detail |
---|
public String tableName()
GenericTable
represents.
tableName
in interface GenericTable
public String classColumnFamily()
classColumnFamily
in interface EvidenceTable
public byte[] classColumnFamilyBytes()
classColumnFamilyBytes
in interface EvidenceTable
public String dependencyColumnFamily()
dependencyColumnFamily
in interface EvidenceTable
public byte[] dependencyColumnFamilyBytes()
dependencyColumnFamilyBytes
in interface EvidenceTable
public String hypernymColumn()
hypernymColumn
in interface EvidenceTable
public byte[] hypernymColumnBytes()
hypernymColumnBytes
in interface EvidenceTable
public String cousinColumn()
cousinColumn
in interface EvidenceTable
public byte[] cousinColumnBytes()
cousinColumnBytes
in interface EvidenceTable
public void createTable()
HTable
represented by this GenericTable
createTable
in interface GenericTable
public void createTable(org.apache.hadoop.hbase.client.HConnection connector)
HTable
represented by this GenericTable
createTable
in interface GenericTable
public void setupScan(org.apache.hadoop.hbase.client.Scan scan)
Scan
such that it will request whatever columns and
column families are neccesary for processing as determined by the table
type. This method will only be called once per job.
setupScan
in interface GenericTable
public void setupScan(org.apache.hadoop.hbase.client.Scan scan, String corpusName)
Scan
such that it will request columns and
column families are neccesary for extracting the raw document text,
dependency trees, and document source information from the specified
corpusName
.
setupScan
in interface GenericTable
public Iterator<org.apache.hadoop.hbase.client.Result> iterator(org.apache.hadoop.hbase.client.Scan scan)
GenericTable
.
iterator
in interface GenericTable
public org.apache.hadoop.hbase.client.HTable table()
HTable
instance attached to this GenericTable
.
table
in interface GenericTable
public StringPair nounPair(org.apache.hadoop.hbase.client.Result row)
StringPair
for the noun pair held in the given Result
.
nounPair
in interface EvidenceTable
public Counter<String> getDependencyPaths(org.apache.hadoop.hbase.client.Result row)
getDependencyPaths
in interface EvidenceTable
public Counter<String> getDependencyPaths(org.apache.hadoop.hbase.client.Result row, String source)
getDependencyPaths
in interface EvidenceTable
public void putDependencyPaths(String word1, String word2, String source, Counter<String> pathCounts)
source
corpus
using the provided Put
object.
putDependencyPaths
in interface EvidenceTable
public SynsetRelations.HypernymStatus getHypernymStatus(org.apache.hadoop.hbase.client.Result row)
SynsetRelations.HypernymStatus
for the given Result
. The
status will be the same across all corpora.
getHypernymStatus
in interface EvidenceTable
public void putHypernymStatus(org.apache.hadoop.hbase.io.ImmutableBytesWritable key, SynsetRelations.HypernymStatus status)
SynsetRelations.HypernymStatus
using the given key
. The
status will be the same across all corpora.
putHypernymStatus
in interface EvidenceTable
public void close()
GenericTable
close
in interface GenericTable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |