C# Class SIL.FieldWorks.IText.SandboxBase.MorphemeBreaker

Analyze the string. We're looking for something like un- except -ion -al -ly. The one with spaces on both sides is a root, the others are prefixes or suffixes. Todo WW(JohnT): enhance to handle other morpheme break characters. Todo WW (JohnT): enhance to look for trailing ;POS and handle appropriately.
显示文件 Open project: sillsdev/FieldWorks Class Usage Examples

Public Methods

Method Description
BreakIntoMorphs ( string morphFormWithMarkers, string baseWord ) : List
DoBasicFinding ( string input, string breakMarkers, string prefixMarkers, string postfixMarkers ) : string

Handle basic work on finding the morpheme breaks.

MakeSel ( ) : void

Reestablish a selection, if possible.

MorphemeBreaker ( CachePair caches, string input, int hvoSbWord, int wsVern, SandboxBase sandbox ) : System
Run ( ) : void

Run the morpheme breaking algorithm.

Private Methods

Method Description
AdjustIpForInsertions ( string fullForm ) : void

Check the fullForm for added spaces. m_input must be unchanged since fullForm was changed.

BreakIntoMorphs ( string morphFormWithMarkers, string baseWord, List &ccTrailingMorphs ) : List

Split the string into morphs respecting existing spaces in base word

GetExistingMorphForm ( int &hvoSbMorph, int &hvoSbForm, int imorph ) : string
HandleMorpheme ( string stMorph, int ccTrailing, bool fMonoMorphemic ) : void

Should be called with a non-empty sequence of characters from m_ichStartMorpheme to m_ich as a morpheme.

IchLimOfMorphs ( string sourceString, bool fBaseWordIsPhrase ) : List

get the end offsets for potential morphs based upon whitespace delimiters

TrimInputString ( ) : string
WhiteSpaceOffsets ( string sourceString ) : List

Method Details

BreakIntoMorphs() public static method

public static BreakIntoMorphs ( string morphFormWithMarkers, string baseWord ) : List
morphFormWithMarkers string
baseWord string
return List

DoBasicFinding() public static method

Handle basic work on finding the morpheme breaks.
public static DoBasicFinding ( string input, string breakMarkers, string prefixMarkers, string postfixMarkers ) : string
input string
breakMarkers string
prefixMarkers string
postfixMarkers string
return string

MakeSel() public method

Reestablish a selection, if possible.
public MakeSel ( ) : void
return void

MorphemeBreaker() public method

public MorphemeBreaker ( CachePair caches, string input, int hvoSbWord, int wsVern, SandboxBase sandbox ) : System
caches CachePair
input string
hvoSbWord int
wsVern int
sandbox SandboxBase
return System

Run() public method

Run the morpheme breaking algorithm.
public Run ( ) : void
return void