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 |
changeCategoryAttributes(String category,
String newEndpoint,
String newLinkingTemplatePath,
String newEnrichingTemplatePath,
String newSparqlQueryofEntitiesPath,
String newResourceClass)
Replaces the given category attributes with new in x-link.properties
file.
|
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.
|
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.
|
public GateEntityMiningComponent(String gateHome) throws MalformedURLException, URISyntaxException, FileNotFoundException, NoProperXLinkRepositoryException, IOException
gateHome - The path of the GATE folder.MalformedURLExceptionURISyntaxExceptionFileNotFoundExceptionNoProperXLinkRepositoryExceptionIOExceptionpublic 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> entries) 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.entries - The set of entries 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 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
EntityMiningComponentreplaceCategoryByQuery in interface EntityMiningComponentcategoryName - The name of category that will be replaced in the
entity mining component.CategoryNotFoundExceptionFileNotFoundExceptionUnsupportedEncodingExceptionCategoryAlreadyExistsExceptionIOExceptionXLinkIsOffExceptionIllegalCategoryNameExceptionNoProperCategoryNameExceptionNoGivenSPARQLEndpointExceptionNoGivenSparqlQueryFileExceptionEmptyListOfNamedEntitiesExceptionpublic void replaceCategoryByQueryPath(String categoryName, String endpoint, String queryPath) 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.queryPath - 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
EntityMiningComponentrenameCategory in interface EntityMiningComponentoldCategory - The given category name.newCategory - The new name of the category.CategoryNotFoundExceptionCategoryAlreadyExistsExceptionIOExceptionXLinkIsOffExceptionNoProperCategoryNameExceptionIllegalCategoryNameExceptionpublic void changeCategoryAttributes(String category, String newEndpoint, String newLinkingTemplatePath, String newEnrichingTemplatePath, String newSparqlQueryofEntitiesPath, String newResourceClass) throws IOException, CategoryNotFoundException, MalformedURLException, URISyntaxException
EntityMiningComponentchangeCategoryAttributes in interface EntityMiningComponentcategory - The category which attributes we want to change.newEndpoint - The new endpoint.newLinkingTemplatePath - The new linking template query path.newEnrichingTemplatePath - The new enriching template query path.newSparqlQueryofEntitiesPath - The SPARQL query of entities path.newResourceClass - The new resource class.IOExceptionMalformedURLExceptionCategoryNotFoundExceptionURISyntaxExceptionpublic 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 entries 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 changeEditDistance(boolean usage)
throws FileNotFoundException,
IOException
EntityMiningComponentchangeEditDistance in interface EntityMiningComponentusage - true if we want to use the edit distance function, false
otherwise.FileNotFoundExceptionIOExceptionpublic void changeConnectRadius(int value)
throws FileNotFoundException,
IOException
EntityMiningComponentchangeConnectRadius in interface EntityMiningComponentFileNotFoundExceptionIOExceptionCopyright © 2014. All rights reserved.