Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danieldiekmeier/shark-semanticnethelper
Helper class for use with the Shark Framework (University Project)
https://github.com/danieldiekmeier/shark-semanticnethelper
Last synced: about 7 hours ago
JSON representation
Helper class for use with the Shark Framework (University Project)
- Host: GitHub
- URL: https://github.com/danieldiekmeier/shark-semanticnethelper
- Owner: danieldiekmeier
- License: mit
- Created: 2016-02-02T19:52:55.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-02T20:03:54.000Z (almost 9 years ago)
- Last Synced: 2023-08-01T00:30:05.321Z (over 1 year ago)
- Language: Java
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SemanticNetHelper
Helper class to use with SemanticNet objects of the [Shark Framework](http://sharksystem.net/). You can pass the SemanticNet instance to the helper class to perform different checks or transform the SemanticNet to follow certain rules.
## Usage
SemanticNetHelper features five methods. Three of them check the given SemanticNet for a certain property of SemanticNets, the other two change the SemanticNet so it has two of these properties.
### `boolean isTaxonomy(SemanticNet semanticNet, String predicate)`
Checks if the SemanticNet instance is a correct taxonomy using Tarjan's Strongly Connected Components Algorithm: https://en.wikipedia.org/wiki/Tarjan%27s_strongly_connected_components_algorithm
@param `semanticNet` A SemanticNet, probably with some SemanticTags that have some kind of connection
@param `predicate` The predicate that should be checked.
@return `true` if the connections of Predicate in the SemanticNet form a taxonomy, `false` if there are circular dependencies between the tags
### `boolean isTransitive(SemanticNet semanticNet, String predicate)`
Checks if all the connections of predicate in the SemanticNet instance form a transitive net.
@param `semanticNet` A SemanticNet, probably with some SemanticTags that have some kind of connection
@param `predicate` The predicate that should be checked.
@return `true` if all connections of the Predicate are transitive, `false` if they are not
### `boolean isSymmetric(SemanticNet semanticNet, String predicate)`
@param `semanticNet` A SemanticNet, probably with some SemanticTags that have some kind of connection
@param `predicate` The predicate that should be checked.
@return `true` if all connections with the predicate are symmetric
### `void makeSymmetric(SemanticNet semanticNet, String predicate)`
Changes the SemanticNet to make all the connections of predicate symmetric, that means that every connection that previously only went from A -> B, now also goes from B -> A.
(The SemanticNet is then guaranteed to pass .isSymmetric for the same predicate.)
@param `semanticNet` A SemanticNet, probably with some SemanticTags that have some kind of connection
@param `predicate` The predicate that should be checked.
### `void makeTransitive(SemanticNet semanticNet, String predicate)`
Changes the SemanticNet to make all the connections of predicate transitive. (The SemanticNet is then guaranteed to pass .isTransitive for the same predicate.)
@param `semanticNet` A SemanticNet, probably with some SemanticTags that have some kind of connection
@param `predicate` The predicate that should be checked.