public class PathBasedBasisMapping extends Object implements DependencyPathBasisMapping
BasisMapping
implementation where each unique path consisting of
words and relations corresponds to a unique dimension. For example "bowl"
occuring with the "SBJ
" relation will be treated as a seperate
dimension than "bowl" with the "OBJ
" relation and separate from
"bowl" with the path "bowl-SBJ-filled-OBJ-punch".Constructor and Description |
---|
PathBasedBasisMapping()
Creates an empty
PathBasedBasisMapping . |
Modifier and Type | Method and Description |
---|---|
int |
getDimension(DependencyPath path)
Returns the dimension number corresponding to the term at the end of the
provided path.
|
String |
getDimensionDescription(int dimension)
Returns the path mapped to the provided dimension.
|
boolean |
isReadOnly()
Returns true if the
BasisMapping is read only, false otherwise. |
Set<String> |
keySet()
Returns the set of keys known by this
BasisMapping |
int |
numDimensions()
Returns the number of dimensions currently represented in this basis
mapping.
|
void |
setReadOnly(boolean readOnly)
Sets the read only state of the basis mapping.
|
public PathBasedBasisMapping()
PathBasedBasisMapping
.public int getDimension(DependencyPath path)
getDimension
in interface BasisMapping<DependencyPath,String>
path
- a path whose end represents a semantic connectionpublic String getDimensionDescription(int dimension)
getDimensionDescription
in interface BasisMapping<DependencyPath,String>
dimension
- a dimension numberpublic int numDimensions()
numDimensions
in interface BasisMapping<DependencyPath,String>
public void setReadOnly(boolean readOnly)
setReadOnly
in interface BasisMapping<DependencyPath,String>
public boolean isReadOnly()
BasisMapping
is read only, false otherwise.isReadOnly
in interface BasisMapping<DependencyPath,String>
public Set<String> keySet()
BasisMapping
keySet
in interface BasisMapping<DependencyPath,String>
Copyright © 2012. All Rights Reserved.