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.
|
GateEntityMiningComponent(String gateHome,
String rdfConfigFilePath)
Creates a new GATE entity mining component using a RDF
configuration file.
|
| 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 |
changeEditDistanceValue(Double value)
Sets/Changes the maximum permitted value of edit distance between two strings.
|
void |
changeEntityResourceRankingFunction(String functionName,
String isDefinedBy)
Changes the function used for the semantic resources ranking (e.g.
|
void |
clean()
Removes the temporal categories that had been created during the
temporal configuration process.
|
void |
disableFuzzyMatching()
Disables the usage of edit distance function (fuzzy matching) in entity mining tool.
|
void |
disablePartialMatching()
Disables the usage of partial matching function in entity mining tool.
|
void |
enableFuzzyMatching()
Enables the usage of edit distance function (fuzzy matching) in entity mining tool.
|
void |
enablePartialMatching()
Enables the usage of partial matching function in entity mining tool.
|
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.
|
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 sparqlQueryPath)
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 |
setConfiguration(String rdfConfigFilePath)
Replaces the existing configuration file (x-link.properties)
with a new one expressed in RDF.
|
void |
setConfiguration(String rdfConfigFilePath,
org.openrdf.rio.RDFFormat format)
Replaces the existing configuration file (x-link.properties)
with a new one expressed in RDF.
|
void |
setGateHome(String gateHome)
Sets/changes the GATE home folder.
|
void |
setTempConfiguration(String rdfConfigFilePath)
Updates temporally the existing configuration file (x-link.properties)
with a new one expressed in RDF.
|
void |
setTempConfiguration(String rdfConfigFilePath,
org.openrdf.rio.RDFFormat format)
Updates temporally the existing configuration file (x-link.properties)
with a new one expressed in RDF.
|
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> entities)
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 NoProperXLinkRepositoryException, URISyntaxException, FileNotFoundException, IOException
gateHome - The path of the GATE folder.NoProperXLinkRepositoryExceptionURISyntaxExceptionIOExceptionFileNotFoundExceptionpublic GateEntityMiningComponent(String gateHome, String rdfConfigFilePath) throws MalformedURLException, URISyntaxException, FileNotFoundException, NoProperXLinkRepositoryException, IOException, org.openrdf.rio.RDFParseException, org.openrdf.repository.RepositoryException
gateHome - The path of the GATE folder.rdfConfigFilePath - The path of the RDF configuration file.MalformedURLExceptionURISyntaxExceptionFileNotFoundExceptionNoProperXLinkRepositoryExceptionorg.openrdf.rio.RDFParseExceptionorg.openrdf.repository.RepositoryExceptionIOExceptionpublic void startup()
EntityMiningComponentstartup in interface EntityMiningComponentpublic void shutdown()
EntityMiningComponentshutdown in interface EntityMiningComponentpublic ArrayList<Category> getAvailableCategories()
EntityMiningComponentgetAvailableCategories in interface EntityMiningComponentpublic void addNewCategory(Category category) throws CategoryAlreadyExistsException, XLinkIsOffException, IllegalCategoryNameException, NoProperCategoryNameException
EntityMiningComponentaddNewCategory in interface EntityMiningComponentcategory - The category that will be added in the entity mining
component.CategoryAlreadyExistsExceptionXLinkIsOffExceptionIllegalCategoryNameExceptionNoProperCategoryNameExceptionpublic void removeCategory(String categoryName) throws CategoryNotFoundException, FileNotFoundException, UnsupportedEncodingException, IOException, XLinkIsOffException
EntityMiningComponentremoveCategory in interface EntityMiningComponentcategoryName - The name of the category that we want to remove from
the entity mining component.CategoryNotFoundExceptionFileNotFoundExceptionUnsupportedEncodingExceptionIOExceptionXLinkIsOffExceptionpublic void updateCategoryBySet(String categoryName, Set<String> entities) throws CategoryNotFoundException, FileNotFoundException, IOException, XLinkIsOffException, EmptyListOfNamedEntitiesException
EntityMiningComponentupdateCategoryBySet in interface EntityMiningComponentcategoryName - The name of the category that we want to update from
the entity mining component.entities - The set of entities that we want to add to the given
category from the entity mining component.CategoryNotFoundExceptionFileNotFoundExceptionIOExceptionXLinkIsOffExceptionEmptyListOfNamedEntitiesExceptionpublic void updateCategoryBySingleEntity(String categoryName, String entity) throws CategoryNotFoundException, FileNotFoundException, IOException, XLinkIsOffException, EmptyListOfNamedEntitiesException
EntityMiningComponentupdateCategoryBySingleEntity in interface EntityMiningComponentcategoryName - 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.CategoryNotFoundExceptionFileNotFoundExceptionIOExceptionXLinkIsOffExceptionEmptyListOfNamedEntitiesExceptionpublic void printAvailableCategories()
EntityMiningComponentprintAvailableCategories in interface EntityMiningComponentpublic void restart()
EntityMiningComponentrestart in interface EntityMiningComponentpublic 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 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
EntityMiningComponentreplaceCategoryByQuery in interface EntityMiningComponentcategoryName - The name of category that will be replaced in the
entity mining component.CategoryNotFoundExceptionFileNotFoundExceptionUnsupportedEncodingExceptionCategoryAlreadyExistsExceptionIOExceptionXLinkIsOffExceptionIllegalCategoryNameExceptionNoProperCategoryNameExceptionNoGivenSPARQLEndpointExceptionNoGivenSparqlQueryFileExceptionEmptyListOfNamedEntitiesExceptionMalformedURLExceptionpublic void replaceCategoryByQueryPath(String categoryName, String endpoint, String sparqlQueryPath) throws CategoryNotFoundException, FileNotFoundException, UnsupportedEncodingException, CategoryAlreadyExistsException, IOException, XLinkIsOffException, IllegalCategoryNameException, NoProperCategoryNameException, NoGivenSPARQLEndpointException, NoGivenSparqlQueryFileException, EmptyListOfNamedEntitiesException, MalformedURLException, URISyntaxException
EntityMiningComponentreplaceCategoryByQueryPath in interface EntityMiningComponentcategoryName - The name of category that will be replaced in the
entity mining component.endpoint - The endpoint of Knowledge Base.sparqlQueryPath - The path of SPARQL query.CategoryNotFoundExceptionFileNotFoundExceptionUnsupportedEncodingExceptionCategoryAlreadyExistsExceptionIOExceptionMalformedURLExceptionXLinkIsOffExceptionIllegalCategoryNameExceptionNoProperCategoryNameExceptionNoGivenSPARQLEndpointExceptionNoGivenSparqlQueryFileExceptionEmptyListOfNamedEntitiesExceptionURISyntaxExceptionpublic void replaceCategoryByQuery(String categoryName, String endpoint, String sparqlQuery) throws CategoryNotFoundException, FileNotFoundException, UnsupportedEncodingException, CategoryAlreadyExistsException, IOException, XLinkIsOffException, IllegalCategoryNameException, NoProperCategoryNameException, NoGivenSPARQLEndpointException, NoGivenSparqlQueryFileException, EmptyListOfNamedEntitiesException, MalformedURLException, URISyntaxException
EntityMiningComponentreplaceCategoryByQuery in interface EntityMiningComponentcategoryName - 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.CategoryNotFoundExceptionFileNotFoundExceptionUnsupportedEncodingExceptionCategoryAlreadyExistsExceptionIOExceptionMalformedURLExceptionXLinkIsOffExceptionIllegalCategoryNameExceptionNoProperCategoryNameExceptionNoGivenSPARQLEndpointExceptionNoGivenSparqlQueryFileExceptionEmptyListOfNamedEntitiesExceptionURISyntaxExceptionpublic void replaceCategoryByResourceClass(String categoryName) throws CategoryNotFoundException, FileNotFoundException, UnsupportedEncodingException, CategoryAlreadyExistsException, IOException, XLinkIsOffException, IllegalCategoryNameException, NoProperCategoryNameException, NoGivenResourceClassException, EmptyListOfNamedEntitiesException
EntityMiningComponentreplaceCategoryByResourceClass in interface EntityMiningComponentcategoryName - The category that will be replaced in the entity
mining component.CategoryNotFoundExceptionFileNotFoundExceptionUnsupportedEncodingExceptionCategoryAlreadyExistsExceptionIOExceptionXLinkIsOffExceptionIllegalCategoryNameExceptionNoProperCategoryNameExceptionNoGivenResourceClassExceptionEmptyListOfNamedEntitiesExceptionpublic void replaceCategoryByResourceClass(String categoryName, String resourceClass, String endpoint) throws CategoryNotFoundException, FileNotFoundException, UnsupportedEncodingException, CategoryAlreadyExistsException, IOException, XLinkIsOffException, IllegalCategoryNameException, NoProperCategoryNameException, NoGivenResourceClassException, EmptyListOfNamedEntitiesException, NoGivenSPARQLEndpointException, MalformedURLException
EntityMiningComponentreplaceCategoryByResourceClass in interface EntityMiningComponentcategoryName - The category that will be replaced in the entity
mining component.resourceClass - The resource Class.endpoint - The endpoint.CategoryNotFoundExceptionFileNotFoundExceptionUnsupportedEncodingExceptionCategoryAlreadyExistsExceptionIOExceptionMalformedURLExceptionXLinkIsOffExceptionIllegalCategoryNameExceptionNoProperCategoryNameExceptionNoGivenResourceClassExceptionEmptyListOfNamedEntitiesExceptionNoGivenSPARQLEndpointExceptionpublic void renameCategory(String oldCategory, String newCategory) throws CategoryNotFoundException, CategoryAlreadyExistsException, IOException, XLinkIsOffException, NoProperCategoryNameException, IllegalCategoryNameException, FileNotFoundException, MalformedURLException
EntityMiningComponentrenameCategory in interface EntityMiningComponentoldCategory - The given category name.newCategory - The new name of the category.CategoryNotFoundExceptionCategoryAlreadyExistsExceptionIOExceptionXLinkIsOffExceptionNoProperCategoryNameExceptionIllegalCategoryNameExceptionFileNotFoundExceptionMalformedURLExceptionpublic void replaceCategoryBySet(String categoryName, Set<String> entities) throws CategoryNotFoundException, XLinkIsOffException, FileNotFoundException, UnsupportedEncodingException, IOException, CategoryAlreadyExistsException, IllegalCategoryNameException, NoProperCategoryNameException, EmptyListOfNamedEntitiesException
EntityMiningComponentreplaceCategoryBySet in interface EntityMiningComponentcategoryName - The name of the category that we want to update from
the entity mining component.entities - The set of entities that we want to add to the given
category from the entity mining component.CategoryNotFoundExceptionXLinkIsOffExceptionFileNotFoundExceptionUnsupportedEncodingExceptionIOExceptionCategoryAlreadyExistsExceptionIllegalCategoryNameExceptionNoProperCategoryNameExceptionEmptyListOfNamedEntitiesExceptionpublic void updateCategoryByQuery(String categoryName) throws XLinkIsOffException, CategoryNotFoundException, NoGivenSPARQLEndpointException, NoGivenSparqlQueryFileException, FileNotFoundException, IOException, EmptyListOfNamedEntitiesException
EntityMiningComponentupdateCategoryByQuery in interface EntityMiningComponentcategoryName - The name of category that will be updated in the
entity mining component.XLinkIsOffExceptionCategoryNotFoundExceptionNoGivenSPARQLEndpointExceptionNoGivenSparqlQueryFileExceptionFileNotFoundExceptionIOExceptionEmptyListOfNamedEntitiesExceptionpublic void updateCategoryByQueryPath(String categoryName, String endpoint, String sparqlQueryPath) throws XLinkIsOffException, CategoryNotFoundException, NoGivenSPARQLEndpointException, NoGivenSparqlQueryFileException, FileNotFoundException, IOException, EmptyListOfNamedEntitiesException, MalformedURLException, URISyntaxException
EntityMiningComponentupdateCategoryByQueryPath in interface EntityMiningComponentcategoryName - The name of category that will be updated in the
entity mining component.endpoint - The endpoint.sparqlQueryPath - The path of sparql query.XLinkIsOffExceptionCategoryNotFoundExceptionNoGivenSPARQLEndpointExceptionNoGivenSparqlQueryFileExceptionFileNotFoundExceptionIOExceptionMalformedURLExceptionEmptyListOfNamedEntitiesExceptionURISyntaxExceptionpublic void updateCategoryByQuery(String categoryName, String endpoint, String sparqlQuery) throws XLinkIsOffException, CategoryNotFoundException, NoGivenSPARQLEndpointException, NoGivenSparqlQueryFileException, FileNotFoundException, IOException, EmptyListOfNamedEntitiesException, MalformedURLException, URISyntaxException
EntityMiningComponentupdateCategoryByQuery in interface EntityMiningComponentcategoryName - The name of category that will be updated in the
entity mining component.endpoint - The endpoint.sparqlQuery - The user defined sparql query.XLinkIsOffExceptionCategoryNotFoundExceptionNoGivenSPARQLEndpointExceptionNoGivenSparqlQueryFileExceptionFileNotFoundExceptionIOExceptionMalformedURLExceptionEmptyListOfNamedEntitiesExceptionURISyntaxExceptionpublic void updateCategoryByResourceClass(String categoryName) throws FileNotFoundException, IOException, CategoryNotFoundException, XLinkIsOffException, NoGivenResourceClassException, EmptyListOfNamedEntitiesException
EntityMiningComponentupdateCategoryByResourceClass in interface EntityMiningComponentcategoryName - The name of category that will be updated in the
entity mining component.FileNotFoundExceptionIOExceptionCategoryNotFoundExceptionXLinkIsOffExceptionNoGivenResourceClassExceptionEmptyListOfNamedEntitiesExceptionpublic void updateCategoryByResourceClass(String categoryName, String endpoint, String resourceClass) throws FileNotFoundException, IOException, CategoryNotFoundException, XLinkIsOffException, NoGivenResourceClassException, EmptyListOfNamedEntitiesException, NoGivenSPARQLEndpointException, MalformedURLException
EntityMiningComponentupdateCategoryByResourceClass in interface EntityMiningComponentcategoryName - The name of category that will be updated in the
entity mining component.endpoint - The endpoint.resourceClass - The resource class.FileNotFoundExceptionIOExceptionMalformedURLExceptionCategoryNotFoundExceptionXLinkIsOffExceptionNoGivenResourceClassExceptionEmptyListOfNamedEntitiesExceptionNoGivenSPARQLEndpointExceptionpublic Category getCategory(String categoryName) throws CategoryNotFoundException
EntityMiningComponentgetCategory in interface EntityMiningComponentcategoryName - The name of the category we want to find and retrieve.CategoryNotFoundExceptionpublic void changeEditDistanceValue(Double value) throws FileNotFoundException, IOException
EntityMiningComponentchangeEditDistanceValue in interface EntityMiningComponentvalue - The maximum permitted value of edit distanceFileNotFoundExceptionIOExceptionpublic void enableFuzzyMatching()
throws IOException
EntityMiningComponentenableFuzzyMatching in interface EntityMiningComponentFileNotFoundExceptionIOExceptionpublic void disableFuzzyMatching()
throws IOException
EntityMiningComponentdisableFuzzyMatching in interface EntityMiningComponentFileNotFoundExceptionIOExceptionpublic void enablePartialMatching()
throws IOException
EntityMiningComponentenablePartialMatching in interface EntityMiningComponentFileNotFoundExceptionIOExceptionpublic void disablePartialMatching()
throws IOException
EntityMiningComponentdisablePartialMatching in interface EntityMiningComponentFileNotFoundExceptionIOExceptionpublic void changeConnectRadius(int value)
throws FileNotFoundException,
IOException
EntityMiningComponentchangeConnectRadius in interface EntityMiningComponentFileNotFoundExceptionIOExceptionpublic void updatePropertiesFile(Category category, String kbms) throws FileNotFoundException, IOException, MalformedURLException, URISyntaxException, NoProperXLinkRepositoryException
updatePropertiesFile in interface EntityMiningComponentFileNotFoundExceptionIOExceptionMalformedURLExceptionURISyntaxExceptionNoProperXLinkRepositoryExceptionpublic void exportConfigurationToRDF(String filepath, org.openrdf.rio.RDFFormat format)
EntityMiningComponentexportConfigurationToRDF in interface EntityMiningComponentfilepath - The path of the RDF file.format - The format of RDF file.public void changeEntityResourceRankingFunction(String functionName, String isDefinedBy) throws FileNotFoundException, IOException
EntityMiningComponentchangeEntityResourceRankingFunction in interface EntityMiningComponentfunctionName - The label of the ranking function.isDefinedBy - The source of the ranking function.FileNotFoundExceptionIOExceptionpublic void setConfiguration(String rdfConfigFilePath)
EntityMiningComponentsetConfiguration in interface EntityMiningComponentrdfConfigFilePath - The file path of the new configuration file.public void setConfiguration(String rdfConfigFilePath, org.openrdf.rio.RDFFormat format)
EntityMiningComponentsetConfiguration in interface EntityMiningComponentrdfConfigFilePath - The file path of the new configuration file.format - The RDF format of the file that contains the new
configuration.public void setTempConfiguration(String rdfConfigFilePath)
EntityMiningComponentsetTempConfiguration in interface EntityMiningComponentrdfConfigFilePath - The file path of the new configuration file.public void setTempConfiguration(String rdfConfigFilePath, org.openrdf.rio.RDFFormat format)
EntityMiningComponentsetTempConfiguration in interface EntityMiningComponentrdfConfigFilePath - The file path of the new configuration file.format - The RDF format of the file that contains the new
configuration.public void clean()
EntityMiningComponentclean in interface EntityMiningComponentCopyright © 2016. All rights reserved.