Package org.getalp.dbnary.api
Interface IWiktionaryDataHandler
-
- All Known Implementing Classes:
OntolexBasedRDFDataHandler
,PostTranslationDataHandler
,WiktionaryDataHandler
,WiktionaryDataHandler
,WiktionaryDataHandler
,WiktionaryDataHandler
,WiktionaryDataHandler
,WiktionaryDataHandler
,WiktionaryDataHandler
,WiktionaryDataHandler
,WiktionaryDataHandler
,WiktionaryDataHandler
,WiktionaryDataHandler
,WiktionaryDataHandler
,WiktionaryDataHandler
,WiktionaryDataHandler
,WiktionaryDataHandler
,WiktionaryDataHandler
,WiktionaryDataHandler
,WiktionaryDataHandler
,WiktionaryDataHandler
,WiktionaryDataHandler
,WiktionaryDataHandler
,WiktionaryDataHandler
,WiktionaryDataHandler
,WiktionaryDataHandler
,WiktionaryDataHandler
public interface IWiktionaryDataHandler
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description org.apache.jena.rdf.model.Resource
addToCurrentWordSense(Set<org.apache.commons.lang3.tuple.Pair<org.apache.jena.rdf.model.Property,org.apache.jena.rdf.model.RDFNode>> context)
void
buildDatacubeObservations(String l, TranslationGlossesStat translationGlossesStat, EvaluationStats.Stat stat, String dumpFileVersion)
void
closeDataset()
close the dataset that eventually backs up the different feature boxes.void
computeStatistics(org.apache.jena.rdf.model.Model statsModel, org.apache.jena.rdf.model.Model sourceModel, String dumpVersion)
org.apache.jena.rdf.model.Resource
createGlossResource(String gloss)
org.apache.jena.rdf.model.Resource
createGlossResource(String gloss, int rank)
org.apache.jena.rdf.model.Resource
createGlossResource(StructuredGloss gloss)
org.apache.jena.rdf.model.Resource
createGlossResource(StructuredGloss gloss, int rank)
org.apache.jena.rdf.model.Resource
currentLexinfoPos()
String
currentPagename()
String
currentWiktionaryPos()
void
dump(org.apache.jena.rdf.model.Model model, OutputStream out, String format)
Write a serialized represention of this model in a specified language.void
dumpAllFeaturesAsHDT(OutputStream ostream, boolean isExolex)
void
enableEndolexFeatures(ExtractionFeature f)
Enable the extraction of morphological data in a second Model if available.void
enableExolexFeatures(ExtractionFeature f)
void
finalizeLanguageSection()
void
finalizePageExtraction()
String
getCurrentEntryLanguage()
returns the short (2 letter code) id of the language of the current LexicalEntryorg.apache.jena.rdf.model.Model
getEndolexFeatureBox(ExtractionFeature f)
org.apache.jena.rdf.model.Model
getExolexFeatureBox(ExtractionFeature f)
String
getExtractedLanguage()
returns the short (2 letter code) id of the language of the language editionorg.apache.jena.rdf.model.Model
getFeatureBox(ExtractionFeature f)
AbstractGlossFilter
getGlossFilter()
void
initializeLanguageSection(String language)
void
initializeLexicalEntry(String pos)
void
initializePageExtraction(String wiktionaryPageName)
boolean
isDisabled(ExtractionFeature f)
int
nbEntries()
void
populateMetadata(org.apache.jena.rdf.model.Model metadataModel, org.apache.jena.rdf.model.Model sourceModel, String dumpFilename, String extractorVersion, boolean isExolex)
void
registerAlternateSpelling(String alt)
org.apache.jena.rdf.model.Resource
registerExample(String ex, Set<org.apache.commons.lang3.tuple.Pair<org.apache.jena.rdf.model.Property,org.apache.jena.rdf.model.RDFNode>> context)
Register example ex for the current lexical sense.void
registerInflection(String languageCode, String pos, String inflection, String canonicalForm, int defNumber, HashSet<PropertyObjectPair> properties)
void
registerInflection(String languageCode, String pos, String inflection, String canonicalForm, int defNumber, HashSet<PropertyObjectPair> properties, HashSet<PronunciationPair> pronunciations)
void
registerInflection(InflectionData key, Set<String> value)
org.apache.jena.rdf.model.Resource
registerNewDefinition(String def)
Register definition def for the current lexical entry.org.apache.jena.rdf.model.Resource
registerNewDefinition(String def, int lvl)
Register definition def for the current lexical entry.org.apache.jena.rdf.model.Resource
registerNewDefinition(String def, String senseNumber)
Register definition def for the current lexical entry.void
registerNymRelation(String target, String synRelation)
void
registerNymRelation(String target, String synRelation, org.apache.jena.rdf.model.Resource gloss, String usage)
default void
registerNymRelationOnCurrentSense(String target, String synRelation)
void
registerNymRelationOnCurrentSense(String target, String synRelation, org.apache.jena.rdf.model.Resource gloss, String usage)
void
registerPronunciation(String pron, String lang)
void
registerPropertyOnCanonicalForm(org.apache.jena.rdf.model.Property p, org.apache.jena.rdf.model.RDFNode r)
void
registerPropertyOnLexicalEntry(org.apache.jena.rdf.model.Property p, org.apache.jena.rdf.model.RDFNode r)
void
registerTranslation(String lang, org.apache.jena.rdf.model.Resource currentGlose, String usage, String word)
-
-
-
Method Detail
-
closeDataset
void closeDataset()
close the dataset that eventually backs up the different feature boxes.Does nothing when there is no dataset backing up the boxes.
-
enableEndolexFeatures
void enableEndolexFeatures(ExtractionFeature f)
Enable the extraction of morphological data in a second Model if available.- Parameters:
f
- Feature
-
enableExolexFeatures
void enableExolexFeatures(ExtractionFeature f)
-
getFeatureBox
org.apache.jena.rdf.model.Model getFeatureBox(ExtractionFeature f)
-
getEndolexFeatureBox
org.apache.jena.rdf.model.Model getEndolexFeatureBox(ExtractionFeature f)
-
getExolexFeatureBox
org.apache.jena.rdf.model.Model getExolexFeatureBox(ExtractionFeature f)
-
isDisabled
boolean isDisabled(ExtractionFeature f)
-
initializePageExtraction
void initializePageExtraction(String wiktionaryPageName)
-
finalizePageExtraction
void finalizePageExtraction()
-
initializeLanguageSection
void initializeLanguageSection(String language)
-
finalizeLanguageSection
void finalizeLanguageSection()
-
getCurrentEntryLanguage
String getCurrentEntryLanguage()
returns the short (2 letter code) id of the language of the current LexicalEntry- Returns:
- current entry short language code
-
getExtractedLanguage
String getExtractedLanguage()
returns the short (2 letter code) id of the language of the language edition- Returns:
- wiktionary edition short language code
-
initializeLexicalEntry
void initializeLexicalEntry(String pos)
-
registerNewDefinition
org.apache.jena.rdf.model.Resource registerNewDefinition(String def)
Register definition def for the current lexical entry.This method will compute a sense number based on the rank of the definition in the entry.
It is equivalent to registerNewDefinition(def, 1);
- Parameters:
def
- a string- Returns:
-
registerNewDefinition
org.apache.jena.rdf.model.Resource registerNewDefinition(String def, int lvl)
Register definition def for the current lexical entry.This method will compute a sense number based on the rank of the definition in the entry, taking into account the level of the definition. 1, 1a, 1b, 1c, 2, etc.
- Parameters:
def
- the definition stringlvl
- an integer giving the level of the definition (1 or 2).- Returns:
-
registerExample
org.apache.jena.rdf.model.Resource registerExample(String ex, Set<org.apache.commons.lang3.tuple.Pair<org.apache.jena.rdf.model.Property,org.apache.jena.rdf.model.RDFNode>> context)
Register example ex for the current lexical sense.- Parameters:
ex
- the example stringcontext
- map of property + RDFNode that are to be attached to the example object.- Returns:
- a Resource
-
registerNewDefinition
org.apache.jena.rdf.model.Resource registerNewDefinition(String def, String senseNumber)
Register definition def for the current lexical entry.This method will use senseNumber as a sense number for this definition.
- Parameters:
def
- the definition stringsenseNumber
- a string giving the sense number of the definition.- Returns:
-
registerAlternateSpelling
void registerAlternateSpelling(String alt)
-
getGlossFilter
AbstractGlossFilter getGlossFilter()
-
createGlossResource
org.apache.jena.rdf.model.Resource createGlossResource(String gloss, int rank)
-
createGlossResource
org.apache.jena.rdf.model.Resource createGlossResource(StructuredGloss gloss, int rank)
-
createGlossResource
org.apache.jena.rdf.model.Resource createGlossResource(String gloss)
-
createGlossResource
org.apache.jena.rdf.model.Resource createGlossResource(StructuredGloss gloss)
-
registerNymRelation
void registerNymRelation(String target, String synRelation, org.apache.jena.rdf.model.Resource gloss, String usage)
-
registerTranslation
void registerTranslation(String lang, org.apache.jena.rdf.model.Resource currentGlose, String usage, String word)
-
nbEntries
int nbEntries()
-
currentPagename
String currentPagename()
-
dump
void dump(org.apache.jena.rdf.model.Model model, OutputStream out, String format)
Write a serialized represention of this model in a specified language. The language in which to write the model is specified by the lang argument. Predefined values are "RDF/XML", "RDF/XML-ABBREV", "N-TRIPLE", "TURTLE", (and "TTL") and "N3". The default value, represented by null, is "RDF/XML".- Parameters:
model
- the Model to be dumpedout
- an OutputStreamformat
- a String
-
registerNymRelationOnCurrentSense
default void registerNymRelationOnCurrentSense(String target, String synRelation)
-
registerNymRelationOnCurrentSense
void registerNymRelationOnCurrentSense(String target, String synRelation, org.apache.jena.rdf.model.Resource gloss, String usage)
-
registerPropertyOnLexicalEntry
void registerPropertyOnLexicalEntry(org.apache.jena.rdf.model.Property p, org.apache.jena.rdf.model.RDFNode r)
-
registerPropertyOnCanonicalForm
void registerPropertyOnCanonicalForm(org.apache.jena.rdf.model.Property p, org.apache.jena.rdf.model.RDFNode r)
-
registerInflection
void registerInflection(String languageCode, String pos, String inflection, String canonicalForm, int defNumber, HashSet<PropertyObjectPair> properties, HashSet<PronunciationPair> pronunciations)
-
registerInflection
void registerInflection(String languageCode, String pos, String inflection, String canonicalForm, int defNumber, HashSet<PropertyObjectPair> properties)
-
registerInflection
void registerInflection(InflectionData key, Set<String> value)
-
currentWiktionaryPos
String currentWiktionaryPos()
-
currentLexinfoPos
org.apache.jena.rdf.model.Resource currentLexinfoPos()
-
populateMetadata
void populateMetadata(org.apache.jena.rdf.model.Model metadataModel, org.apache.jena.rdf.model.Model sourceModel, String dumpFilename, String extractorVersion, boolean isExolex)
-
buildDatacubeObservations
void buildDatacubeObservations(String l, TranslationGlossesStat translationGlossesStat, EvaluationStats.Stat stat, String dumpFileVersion)
-
computeStatistics
void computeStatistics(org.apache.jena.rdf.model.Model statsModel, org.apache.jena.rdf.model.Model sourceModel, String dumpVersion)
-
dumpAllFeaturesAsHDT
void dumpAllFeaturesAsHDT(OutputStream ostream, boolean isExolex)
-
addToCurrentWordSense
org.apache.jena.rdf.model.Resource addToCurrentWordSense(Set<org.apache.commons.lang3.tuple.Pair<org.apache.jena.rdf.model.Property,org.apache.jena.rdf.model.RDFNode>> context)
-
-