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, WiktionaryDataHandler, WiktionaryDataHandler, WiktionaryDataHandler

public interface IWiktionaryDataHandler
  • Method Details

    • 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 string
      lvl - 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 string
      context - map of property + RDFNode that are to be attached to the example object.
      Returns:
      a Resource
    • registerExampleOnResource

      org.apache.jena.rdf.model.Resource registerExampleOnResource(String ex, Set<org.apache.commons.lang3.tuple.Pair<org.apache.jena.rdf.model.Property, org.apache.jena.rdf.model.RDFNode>> context, org.apache.jena.rdf.model.Resource sense)
      Register example ex for a given lexical sense.
      Parameters:
      ex - the example string
      context - map of property + RDFNode that are to be attached to the example object.
      sense - the Resource of the lexical sens are to be attached with 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 string
      senseNumber - a string giving the sense number of the definition.
      Returns:
    • registerAlternateSpelling

      void registerAlternateSpelling(String alt)
    • registerNymRelation

      void registerNymRelation(String target, String synRelation)
    • 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)
    • registerPronunciation

      void registerPronunciation(String pron, String lang)
    • 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 dumped
      out - an OutputStream
      format - 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)
    • registerDerivation

      void registerDerivation(String derived)
    • registerDerivation

      void registerDerivation(String derived, String note)
    • 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, org.getalp.dbnary.enhancer.evaluation.TranslationGlossesStat translationGlossesStat, org.getalp.dbnary.enhancer.evaluation.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)
    • addTo

      org.apache.jena.rdf.model.Resource addTo(org.apache.jena.rdf.model.Resource target, Set<org.apache.commons.lang3.tuple.Pair<org.apache.jena.rdf.model.Property, org.apache.jena.rdf.model.RDFNode>> pv)
    • 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)