public class GateEntityMiningComponent extends Object implements EntityMiningComponent
Modifier and Type | Field and Description |
---|---|
gate.creole.SerialAnalyserController |
annieController |
Constructor and Description |
---|
GateEntityMiningComponent(String gateHome)
Creates a new GATE entity mining component.
|
Modifier and Type | Method and Description |
---|---|
void |
addNewCategory(Category category)
Adds a new category in the entity mining component.
|
void |
changeConnectRadius(int value)
Changes the connectivity radius, which infers how the identified entities
are connected (i.e.
|
void |
changeEditDistance(boolean usage)
Declares the usage of edit distance function in entity mining tool.
|
void |
changeEditDistanceValue(Double value)
Sets/Changes the maximum permitted value of edit distance between two strings.
|
void |
changeEntityResourceRankingFunction(String functionName)
Changes the function used for the semantic resources ranking (e.g.
|
void |
exportConfigurationToRDF(String filepath,
org.openrdf.rio.RDFFormat format)
Exports the configuration of NEE tool in a RDF file.
|
gate.creole.SerialAnalyserController |
getAnnieController()
Returns the GATE controller.
|
ArrayList<Category> |
getAvailableCategories()
Returns a list with the available categories of the entity mining
component.
|
ArrayList<Category> |
getCategories()
Returns the supported categories of entities.
|
Category |
getCategory(String categoryName)
Finds and Returns the category with the given name.
|
String |
getGateHome()
Returns the GATE home folder.
|
void |
printAvailableCategories()
Prints the available categories of the entity mining component.
|
void |
removeCategory(String categoryName)
Removes the category with the given name from the entity mining
components.
|
void |
renameCategory(String oldCategory,
String newCategory)
Renames the given category name with a new one.
|
void |
replaceCategoryByQuery(String categoryName)
Replaces the given category from the entity mining component by SPARQL
query.
|
void |
replaceCategoryByQuery(String categoryName,
String endpoint,
String sparqlQuery)
Replaces the given category from the entity mining component by a user
defined SPARQL query.
|
void |
replaceCategoryByQueryPath(String categoryName,
String endpoint,
String queryPath)
Replaces the given category from the entity mining component by a
SPARQL query in the given path.
|
void |
replaceCategoryByResourceClass(String categoryName)
Replaces the given category from the entity mining component by Resource
class.
|
void |
replaceCategoryByResourceClass(String categoryName,
String resourceClass,
String endpoint)
Replaces the given category from the entity mining component by a given Resource
class.
|
void |
replaceCategoryBySet(String categoryName,
Set<String> entities)
Replaces the category with the given name from the entity mining
components with the given Set of entities.
|
void |
restart()
Restarts the entity mining component.
|
void |
setAnnieController(gate.creole.SerialAnalyserController annieController)
Sets/changes the GATE controller.
|
void |
setCategories(ArrayList<Category> categories)
Sets/changes the supported categories of entities.
|
void |
setGateHome(String gateHome)
Sets/changes the GATE home folder.
|
void |
shutdown()
Shutdowns the entity mining component.
|
void |
startup()
The entity mining components starts and is initialized.
|
void |
updateCategoryByQuery(String categoryName)
Updates the given category from the entity mining component by SPARQL
query.
|
void |
updateCategoryByQuery(String categoryName,
String endpoint,
String sparqlQuery)
Updates the given category from the entity mining component by a user
defined SPARQL query.
|
void |
updateCategoryByQueryPath(String categoryName,
String endpoint,
String sparqlQueryPath)
Updates the given category from the entity mining component by a SPARQL
query in the given path.
|
void |
updateCategoryByResourceClass(String categoryName)
Updates the given category from the entity mining component by Resource
Class.
|
void |
updateCategoryByResourceClass(String categoryName,
String endpoint,
String resourceClass)
Updates the given category from the entity mining component by a given
Resource Class.
|
void |
updateCategoryBySet(String categoryName,
Set<String> entries)
Updates the category with the given name from the entity mining
components with the given Set of entities.
|
void |
updateCategoryBySingleEntity(String categoryName,
String entity)
Updates the category with the given name from the entity mining
components with the given entity.
|
void |
updatePropertiesFile(Category category,
String kbms) |
public GateEntityMiningComponent(String gateHome) throws MalformedURLException, URISyntaxException, FileNotFoundException, NoProperXLinkRepositoryException, IOException
gateHome
- The path of the GATE folder.MalformedURLException
URISyntaxException
FileNotFoundException
NoProperXLinkRepositoryException
IOException
public void startup()
EntityMiningComponent
startup
in interface EntityMiningComponent
public void shutdown()
EntityMiningComponent
shutdown
in interface EntityMiningComponent
public ArrayList<Category> getAvailableCategories()
EntityMiningComponent
getAvailableCategories
in interface EntityMiningComponent
public void addNewCategory(Category category) throws CategoryAlreadyExistsException, XLinkIsOffException, IllegalCategoryNameException, NoProperCategoryNameException
EntityMiningComponent
addNewCategory
in interface EntityMiningComponent
category
- The category that will be added in the entity mining
component.CategoryAlreadyExistsException
XLinkIsOffException
IllegalCategoryNameException
NoProperCategoryNameException
public void removeCategory(String categoryName) throws CategoryNotFoundException, FileNotFoundException, UnsupportedEncodingException, IOException, XLinkIsOffException
EntityMiningComponent
removeCategory
in interface EntityMiningComponent
categoryName
- The name of the category that we want to remove from
the entity mining component.CategoryNotFoundException
FileNotFoundException
UnsupportedEncodingException
IOException
XLinkIsOffException
public void updateCategoryBySet(String categoryName, Set<String> entries) throws CategoryNotFoundException, FileNotFoundException, IOException, XLinkIsOffException, EmptyListOfNamedEntitiesException
EntityMiningComponent
updateCategoryBySet
in interface EntityMiningComponent
categoryName
- The name of the category that we want to update from
the entity mining component.entries
- The set of entries that we want to add to the given
category from the entity mining component.CategoryNotFoundException
FileNotFoundException
IOException
XLinkIsOffException
EmptyListOfNamedEntitiesException
public void updateCategoryBySingleEntity(String categoryName, String entity) throws CategoryNotFoundException, FileNotFoundException, IOException, XLinkIsOffException, EmptyListOfNamedEntitiesException
EntityMiningComponent
updateCategoryBySingleEntity
in interface EntityMiningComponent
categoryName
- The name of the category that we want to update from
the entity mining component.entity
- The entity that we want to add to the given category from
the entity mining component.CategoryNotFoundException
FileNotFoundException
IOException
XLinkIsOffException
EmptyListOfNamedEntitiesException
public void printAvailableCategories()
EntityMiningComponent
printAvailableCategories
in interface EntityMiningComponent
public void restart()
EntityMiningComponent
restart
in interface EntityMiningComponent
public gate.creole.SerialAnalyserController getAnnieController()
public void setAnnieController(gate.creole.SerialAnalyserController annieController)
annieController
- The GATE controller.public String getGateHome()
public void setGateHome(String gateHome)
gateHome
- The GATE home folder.public ArrayList<Category> getCategories()
public void setCategories(ArrayList<Category> categories)
categories
- The supported categories of entities.public void replaceCategoryByQuery(String categoryName) throws CategoryNotFoundException, FileNotFoundException, UnsupportedEncodingException, CategoryAlreadyExistsException, IOException, XLinkIsOffException, IllegalCategoryNameException, NoProperCategoryNameException, NoGivenSPARQLEndpointException, NoGivenSparqlQueryFileException, EmptyListOfNamedEntitiesException, MalformedURLException
EntityMiningComponent
replaceCategoryByQuery
in interface EntityMiningComponent
categoryName
- The name of category that will be replaced in the
entity mining component.CategoryNotFoundException
FileNotFoundException
UnsupportedEncodingException
CategoryAlreadyExistsException
IOException
XLinkIsOffException
IllegalCategoryNameException
NoProperCategoryNameException
NoGivenSPARQLEndpointException
NoGivenSparqlQueryFileException
EmptyListOfNamedEntitiesException
MalformedURLException
public void replaceCategoryByQueryPath(String categoryName, String endpoint, String queryPath) throws CategoryNotFoundException, FileNotFoundException, UnsupportedEncodingException, CategoryAlreadyExistsException, IOException, XLinkIsOffException, IllegalCategoryNameException, NoProperCategoryNameException, NoGivenSPARQLEndpointException, NoGivenSparqlQueryFileException, EmptyListOfNamedEntitiesException, MalformedURLException, URISyntaxException
EntityMiningComponent
replaceCategoryByQueryPath
in interface EntityMiningComponent
categoryName
- The name of category that will be replaced in the
entity mining component.endpoint
- The endpoint of Knowledge Base.queryPath
- The path of sparql query.CategoryNotFoundException
FileNotFoundException
UnsupportedEncodingException
CategoryAlreadyExistsException
IOException
MalformedURLException
XLinkIsOffException
IllegalCategoryNameException
NoProperCategoryNameException
NoGivenSPARQLEndpointException
NoGivenSparqlQueryFileException
EmptyListOfNamedEntitiesException
URISyntaxException
public void replaceCategoryByQuery(String categoryName, String endpoint, String sparqlQuery) throws CategoryNotFoundException, FileNotFoundException, UnsupportedEncodingException, CategoryAlreadyExistsException, IOException, XLinkIsOffException, IllegalCategoryNameException, NoProperCategoryNameException, NoGivenSPARQLEndpointException, NoGivenSparqlQueryFileException, EmptyListOfNamedEntitiesException, MalformedURLException, URISyntaxException
EntityMiningComponent
replaceCategoryByQuery
in interface EntityMiningComponent
categoryName
- The name of category that will be replaced in the
entity mining component.endpoint
- The endpoint of Knowledge Base.sparqlQuery
- The user defined sparql query.CategoryNotFoundException
FileNotFoundException
UnsupportedEncodingException
CategoryAlreadyExistsException
IOException
MalformedURLException
XLinkIsOffException
IllegalCategoryNameException
NoProperCategoryNameException
NoGivenSPARQLEndpointException
NoGivenSparqlQueryFileException
EmptyListOfNamedEntitiesException
URISyntaxException
public void replaceCategoryByResourceClass(String categoryName) throws CategoryNotFoundException, FileNotFoundException, UnsupportedEncodingException, CategoryAlreadyExistsException, IOException, XLinkIsOffException, IllegalCategoryNameException, NoProperCategoryNameException, NoGivenResourceClassException, EmptyListOfNamedEntitiesException
EntityMiningComponent
replaceCategoryByResourceClass
in interface EntityMiningComponent
categoryName
- The category that will be replaced in the entity
mining component.CategoryNotFoundException
FileNotFoundException
UnsupportedEncodingException
CategoryAlreadyExistsException
IOException
XLinkIsOffException
IllegalCategoryNameException
NoProperCategoryNameException
NoGivenResourceClassException
EmptyListOfNamedEntitiesException
public void replaceCategoryByResourceClass(String categoryName, String resourceClass, String endpoint) throws CategoryNotFoundException, FileNotFoundException, UnsupportedEncodingException, CategoryAlreadyExistsException, IOException, XLinkIsOffException, IllegalCategoryNameException, NoProperCategoryNameException, NoGivenResourceClassException, EmptyListOfNamedEntitiesException, NoGivenSPARQLEndpointException, MalformedURLException
EntityMiningComponent
replaceCategoryByResourceClass
in interface EntityMiningComponent
categoryName
- The category that will be replaced in the entity
mining component.resourceClass
- The resource Class.endpoint
- The endpoint.CategoryNotFoundException
FileNotFoundException
UnsupportedEncodingException
CategoryAlreadyExistsException
IOException
MalformedURLException
XLinkIsOffException
IllegalCategoryNameException
NoProperCategoryNameException
NoGivenResourceClassException
EmptyListOfNamedEntitiesException
NoGivenSPARQLEndpointException
public void renameCategory(String oldCategory, String newCategory) throws CategoryNotFoundException, CategoryAlreadyExistsException, IOException, XLinkIsOffException, NoProperCategoryNameException, IllegalCategoryNameException, FileNotFoundException, MalformedURLException
EntityMiningComponent
renameCategory
in interface EntityMiningComponent
oldCategory
- The given category name.newCategory
- The new name of the category.CategoryNotFoundException
CategoryAlreadyExistsException
IOException
XLinkIsOffException
NoProperCategoryNameException
IllegalCategoryNameException
FileNotFoundException
MalformedURLException
public void replaceCategoryBySet(String categoryName, Set<String> entities) throws CategoryNotFoundException, XLinkIsOffException, FileNotFoundException, UnsupportedEncodingException, IOException, CategoryAlreadyExistsException, IllegalCategoryNameException, NoProperCategoryNameException, EmptyListOfNamedEntitiesException
EntityMiningComponent
replaceCategoryBySet
in interface EntityMiningComponent
categoryName
- The name of the category that we want to update from
the entity mining component.entities
- The set of entries that we want to add to the given
category from the entity mining component.CategoryNotFoundException
XLinkIsOffException
FileNotFoundException
UnsupportedEncodingException
IOException
CategoryAlreadyExistsException
IllegalCategoryNameException
NoProperCategoryNameException
EmptyListOfNamedEntitiesException
public void updateCategoryByQuery(String categoryName) throws XLinkIsOffException, CategoryNotFoundException, NoGivenSPARQLEndpointException, NoGivenSparqlQueryFileException, FileNotFoundException, IOException, EmptyListOfNamedEntitiesException
EntityMiningComponent
updateCategoryByQuery
in interface EntityMiningComponent
categoryName
- The name of category that will be updated in the
entity mining component.XLinkIsOffException
CategoryNotFoundException
NoGivenSPARQLEndpointException
NoGivenSparqlQueryFileException
FileNotFoundException
IOException
EmptyListOfNamedEntitiesException
public void updateCategoryByQueryPath(String categoryName, String endpoint, String sparqlQueryPath) throws XLinkIsOffException, CategoryNotFoundException, NoGivenSPARQLEndpointException, NoGivenSparqlQueryFileException, FileNotFoundException, IOException, EmptyListOfNamedEntitiesException, MalformedURLException, URISyntaxException
EntityMiningComponent
updateCategoryByQueryPath
in interface EntityMiningComponent
categoryName
- The name of category that will be updated in the
entity mining component.endpoint
- The endpoint.sparqlQueryPath
- The path of sparql query.XLinkIsOffException
CategoryNotFoundException
NoGivenSPARQLEndpointException
NoGivenSparqlQueryFileException
FileNotFoundException
IOException
MalformedURLException
EmptyListOfNamedEntitiesException
URISyntaxException
public void updateCategoryByQuery(String categoryName, String endpoint, String sparqlQuery) throws XLinkIsOffException, CategoryNotFoundException, NoGivenSPARQLEndpointException, NoGivenSparqlQueryFileException, FileNotFoundException, IOException, EmptyListOfNamedEntitiesException, MalformedURLException, URISyntaxException
EntityMiningComponent
updateCategoryByQuery
in interface EntityMiningComponent
categoryName
- The name of category that will be updated in the
entity mining component.endpoint
- The endpoint.sparqlQuery
- The user defined sparql query.XLinkIsOffException
CategoryNotFoundException
NoGivenSPARQLEndpointException
NoGivenSparqlQueryFileException
FileNotFoundException
IOException
MalformedURLException
EmptyListOfNamedEntitiesException
URISyntaxException
public void updateCategoryByResourceClass(String categoryName) throws FileNotFoundException, IOException, CategoryNotFoundException, XLinkIsOffException, NoGivenResourceClassException, EmptyListOfNamedEntitiesException
EntityMiningComponent
updateCategoryByResourceClass
in interface EntityMiningComponent
categoryName
- The name of category that will be updated in the
entity mining component.FileNotFoundException
IOException
CategoryNotFoundException
XLinkIsOffException
NoGivenResourceClassException
EmptyListOfNamedEntitiesException
public void updateCategoryByResourceClass(String categoryName, String endpoint, String resourceClass) throws FileNotFoundException, IOException, CategoryNotFoundException, XLinkIsOffException, NoGivenResourceClassException, EmptyListOfNamedEntitiesException, NoGivenSPARQLEndpointException, MalformedURLException
EntityMiningComponent
updateCategoryByResourceClass
in interface EntityMiningComponent
categoryName
- The name of category that will be updated in the
entity mining component.endpoint
- The endpoint.resourceClass
- The resource class.FileNotFoundException
IOException
MalformedURLException
CategoryNotFoundException
XLinkIsOffException
NoGivenResourceClassException
EmptyListOfNamedEntitiesException
NoGivenSPARQLEndpointException
public Category getCategory(String categoryName) throws CategoryNotFoundException
EntityMiningComponent
getCategory
in interface EntityMiningComponent
categoryName
- The name of the category we want to find and retrieve.CategoryNotFoundException
public void changeEditDistanceValue(Double value) throws FileNotFoundException, IOException
EntityMiningComponent
changeEditDistanceValue
in interface EntityMiningComponent
value
- The maximum permitted value of edit distanceFileNotFoundException
IOException
public void changeEditDistance(boolean usage) throws FileNotFoundException, IOException
EntityMiningComponent
changeEditDistance
in interface EntityMiningComponent
usage
- true if we want to use the edit distance function, false otherwise.FileNotFoundException
IOException
public void changeConnectRadius(int value) throws FileNotFoundException, IOException
EntityMiningComponent
changeConnectRadius
in interface EntityMiningComponent
FileNotFoundException
IOException
public void updatePropertiesFile(Category category, String kbms) throws FileNotFoundException, IOException, MalformedURLException, URISyntaxException, NoProperXLinkRepositoryException
updatePropertiesFile
in interface EntityMiningComponent
FileNotFoundException
IOException
MalformedURLException
URISyntaxException
NoProperXLinkRepositoryException
public void exportConfigurationToRDF(String filepath, org.openrdf.rio.RDFFormat format)
exportConfigurationToRDF
in interface EntityMiningComponent
filepath
- The path of the RDF file.format
- The format of RDF file.public void changeEntityResourceRankingFunction(String functionName) throws FileNotFoundException, IOException
changeEntityResourceRankingFunction
in interface EntityMiningComponent
functionName
- The label of the ranking function.IOException
FileNotFoundException
Copyright © 2014. All rights reserved.