org.olat.core.commons.modules.glossary.morphService
Interface MorphologicalService

All Known Implementing Classes:
MorphologicalServiceDEImpl, MorphologicalServiceLocalImpl

public interface MorphologicalService

Description:
Connects to a morphological service and lets retreive flexions for a word.

Initial Date: 23.12.2008

Author:
Roman Haag, frentix GmbH, roman.haag@frentix.com

Field Summary
static java.lang.String STATUS_ERROR
           
static java.lang.String STATUS_GUESSED
           
static java.lang.String STATUS_KNOWN
           
 
Method Summary
 java.lang.String assumePartOfSpeech(java.lang.String glossTerm)
          returns part-of-speech for a given word or wordgroup
 java.util.ArrayList<java.lang.String> getFlexions(java.lang.String word)
          same as getFlexions(String partOfSpeech, String word) but with automatic assumption of partofspeech
 java.util.ArrayList<java.lang.String> getFlexions(java.lang.String partOfSpeech, java.lang.String word)
          returns a list of Flexions found for a given word.
 java.lang.String getMorphServiceDescriptor()
          get service name as description in guis
 java.lang.String getMorphServiceIdentifier()
          get unique identifier to store with glossary-config
 java.lang.String getReplyStatus()
          Get the Status from the reply arrived from the morphological service status can either be: - known Flexions were found in Lexicon - guessed Flexions were generated with heuristics - error Couldn't find anything or service error / unavailable
 

Field Detail

STATUS_KNOWN

static final java.lang.String STATUS_KNOWN
See Also:
Constant Field Values

STATUS_GUESSED

static final java.lang.String STATUS_GUESSED
See Also:
Constant Field Values

STATUS_ERROR

static final java.lang.String STATUS_ERROR
See Also:
Constant Field Values
Method Detail

getFlexions

java.util.ArrayList<java.lang.String> getFlexions(java.lang.String partOfSpeech,
                                                  java.lang.String word)
returns a list of Flexions found for a given word.

Parameters:
partOfSpeech - possible values, see: assumePartOfSpeech()
word - a single word or a wordgroup
Returns:
list of flexions found with a morphological service

getFlexions

java.util.ArrayList<java.lang.String> getFlexions(java.lang.String word)
same as getFlexions(String partOfSpeech, String word) but with automatic assumption of partofspeech

Parameters:
word -
Returns:

assumePartOfSpeech

java.lang.String assumePartOfSpeech(java.lang.String glossTerm)
returns part-of-speech for a given word or wordgroup

Parameters:
glossTerm -
Returns:
part of speech, which can be: - a for an adjective "schön" - n for a noun "Haus" - an for adjective and noun "schönes Haus"

getReplyStatus

java.lang.String getReplyStatus()
Get the Status from the reply arrived from the morphological service status can either be: - known Flexions were found in Lexicon - guessed Flexions were generated with heuristics - error Couldn't find anything or service error / unavailable

Returns:

getMorphServiceDescriptor

java.lang.String getMorphServiceDescriptor()
get service name as description in guis

Returns:

getMorphServiceIdentifier

java.lang.String getMorphServiceIdentifier()
get unique identifier to store with glossary-config

Returns: