public class GeoNamesAugmenter extends SemanticAugmenter implements EntityVerifier
Constructor and Description |
---|
GeoNamesAugmenter()
Create a new GeoNamesReader.
|
GeoNamesAugmenter(java.lang.String filePath)
Create a new GeoNamesReader.
|
Modifier and Type | Method and Description |
---|---|
EntityType |
determineType(java.lang.String term)
Determine the type of an entity.
|
java.lang.String |
getModel()
Get the model string for this verifier.
|
protected java.util.Set<java.lang.String> |
getNewValues(OwlThing thing,
Property prop)
Find the new values for the OwlThing.
|
protected java.util.Set<java.lang.String> |
getRefineValues(OwlThing thing)
Get any possible values used to refine the class of the OwlThing passed
in.
|
java.util.Set<EntityType> |
getSupportedTypes()
Get the supported types for this verifier.
|
java.lang.String |
normalize(java.lang.String term,
EntityType type)
Normalize the name.
|
void |
setConfig(java.lang.String cfg)
Set the configuration information.
|
void |
setModel(java.lang.String cfg)
Set the model information.
|
java.lang.String |
toString()
Return a string representation of this reader
|
boolean |
verifyType(java.lang.String term,
EntityType type)
Verify the entity type.
|
addProperties, addProperty, augment, getConfig, getOwlClass, getProperties, isOverwrite, isRefine, setOverwrite, setOwlClass, setRefine
public GeoNamesAugmenter()
setModel
method.public GeoNamesAugmenter(java.lang.String filePath)
filePath
- the path to the geonames filepublic EntityType determineType(java.lang.String term)
determineType
in interface EntityVerifier
term
- the term to check.public java.lang.String getModel()
getModel
in interface EntityVerifier
protected java.util.Set<java.lang.String> getNewValues(OwlThing thing, Property prop)
getNewValues
in class SemanticAugmenter
thing
- the OwlThing to augmentprop
- the property to get values forprotected java.util.Set<java.lang.String> getRefineValues(OwlThing thing)
getRefineValues
in class SemanticAugmenter
thing
- the thing to find the possible refinements forpublic java.util.Set<EntityType> getSupportedTypes()
getSupportedTypes
in interface EntityVerifier
public java.lang.String normalize(java.lang.String term, EntityType type)
normalize
in interface EntityVerifier
term
- the location nametype
- the entity type, which should be EntityType.LOCATIONpublic void setConfig(java.lang.String cfg)
setConfig
in class SemanticAugmenter
cfg
- the configuration, or the path to the geonames filepublic void setModel(java.lang.String cfg)
setModel
in interface EntityVerifier
cfg
- the configuration, or the path to the geonames filepublic java.lang.String toString()
toString
in class SemanticAugmenter
public boolean verifyType(java.lang.String term, EntityType type)
verifyType
in interface EntityVerifier
term
- the termtype
- the type. This implementation only recognizes
EntityType.LOCATION