public class NifEverything extends Object
| Modifier and Type | Class | Description |
|---|---|---|
static class |
NifEverything.NifProperty |
Wraps implementations of
Marking. |
| Modifier and Type | Field | Description |
|---|---|---|
static String |
INPUT_NOT_PARSABLE |
Will be returned when given NIF via POST is not parsable or empty
|
(package private) org.slf4j.Logger |
logger |
|
private static NifEverything |
nif |
Make this Singleton
|
| Modifier | Constructor | Description |
|---|---|---|
private |
NifEverything() |
Singleton
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
addAllMarkingsToDoc(org.aksw.gerbil.transfer.nif.Document doc,
Collection<org.aksw.gerbil.transfer.nif.Marking> markings) |
Adds all given
Markings to a given Document Needed,
because Document does not have something like
Document.addAll(Collection<Marking>) |
String |
appendNIFResultFromIndexDBO(String documentsString,
IndexDBO indexDBO,
NifEverything.NifProperty nif) |
Appends found properties(classes) annoatation to given NIF.
|
String |
appendNIFResultFromSpotters(String documentsString,
ASpotter spotter) |
Appends found NEs as annotation to given NIF.
|
String |
createNIFResultFromIndexDBO(String q,
IndexDBO indexDBO,
NifEverything.NifProperty nif) |
Creates a NIF with annotations respective to given
NifEverything.NifProperty
respective to given IndexDBO |
String |
createNIFResultFromSpotters(String q,
ASpotter spotter) |
Creates a NIF with annotations respective to given
NifEverything.NifProperty
respective to given ASpotter Annotation will have the form
NifEverything.NifProperty.TAIDENTREF |
private List<org.apache.commons.lang3.tuple.ImmutablePair<String,Integer>> |
extractSplitQuestion(String q) |
Splits Sentence on whitespace (inserts whitespace before Punctuation).
|
static NifEverything |
getInstance() |
|
List<org.aksw.gerbil.transfer.nif.Document> |
parseNIF(String input) |
Extracts a List of NIF
Documents from given String. |
private List<org.aksw.gerbil.transfer.nif.Marking> |
stringToMarkingsIndexDBO(String q,
IndexDBO indexDBO,
NifEverything.NifProperty nif) |
Here the actual annoataion takes place.
|
private List<org.aksw.gerbil.transfer.nif.Marking> |
stringToMarkingsSpotters(String q,
ASpotter spotter) |
Here the actual annoataion takes place.
|
String |
writeNIF(List<org.aksw.gerbil.transfer.nif.Document> docs) |
Creates a NIF String from given NIF
Document list. |
String |
writeNIF(org.aksw.gerbil.transfer.nif.Document doc) |
final org.slf4j.Logger logger
private static NifEverything nif
public static final String INPUT_NOT_PARSABLE
public static NifEverything getInstance()
private List<org.apache.commons.lang3.tuple.ImmutablePair<String,Integer>> extractSplitQuestion(String q)
q - a string to split and calculate Offset on.public String createNIFResultFromIndexDBO(String q, IndexDBO indexDBO, NifEverything.NifProperty nif)
NifEverything.NifProperty
respective to given IndexDBOq - The sentence to run IdexDBO onindexDBO - Choose implementation of @link IndexDBO to find
properties(classes) to store in nifnif - The kind of Annotation how found properties(classes) sould be
represented in NIF (e.g. taIdentRef,taClassRef)public String appendNIFResultFromIndexDBO(String documentsString, IndexDBO indexDBO, NifEverything.NifProperty nif)
documentsString - The NIF as StringindexDBO - Choose implementation of IndexDBO to find
properties(classes) to store in nif.nif - The kind of Annotation how found properties(classes) sould be
represented in NIF (e.g. taIdentRef,taClassRef)public void addAllMarkingsToDoc(org.aksw.gerbil.transfer.nif.Document doc,
Collection<org.aksw.gerbil.transfer.nif.Marking> markings)
Markings to a given Document Needed,
because Document does not have something like
Document.addAll(Collection<Marking>)doc - The Document you wish to add Markings tomarkings - The Markings you want to add.private List<org.aksw.gerbil.transfer.nif.Marking> stringToMarkingsIndexDBO(String q, IndexDBO indexDBO, NifEverything.NifProperty nif)
Markings you can add to a Documentq - String to annotateindexDBO - Sone Annotatornif - Specify here which Style the Annotation should have:
NifEverything.NifPropertyDocumentpublic String appendNIFResultFromSpotters(String documentsString, ASpotter spotter)
NifEverything.NifProperty.TAIDENTREFdocumentsString - The NIF as Stringspotter - A NER tool to use to find named entities.public String writeNIF(List<org.aksw.gerbil.transfer.nif.Document> docs)
Document list.docs - List of Documents to convertpublic String createNIFResultFromSpotters(String q, ASpotter spotter)
NifEverything.NifProperty
respective to given ASpotter Annotation will have the form
NifEverything.NifProperty.TAIDENTREFq - The sentence to run IdexDBO ospotter - A spotter to find named entitiesprivate List<org.aksw.gerbil.transfer.nif.Marking> stringToMarkingsSpotters(String q, ASpotter spotter)
Markings you can add to a Document.
Annotation will have the form NifEverything.NifProperty.TAIDENTREFq - String to annotatespotter - Some NER toolDocumentpublic String writeNIF(org.aksw.gerbil.transfer.nif.Document doc)
doc - A Document to vonvert to an NIFpublic List<org.aksw.gerbil.transfer.nif.Document> parseNIF(String input) throws IllegalArgumentException
Documents from given String.input - String to be parsedDocument listIllegalArgumentException - When input is empty or not parsable.Copyright © 2016–2018 Pivotal Software, Inc.. All rights reserved.