C# Class SIL.FieldWorks.FDO.DomainServices.SemanticDomainSearch.SenseSearchStrategy

This strategy takes a LexSense and finds keywords from the sense's Gloss, Definition and Reversal Entries and uses them to search (primarily) for whole word matches in Semantic Domains.
Inheritance: SemDomSearchStrategy
Exibir arquivo Open project: sillsdev/FieldWorks Class Usage Examples

Private Properties

Property Type Description
AddKeysFrom void
GetSearchKeysFromSense HashSet>.Dictionary
PutDomainInDesiredBucket void

Public Methods

Method Description
SenseSearchStrategy ( FdoCache cache, ILexSense sense ) : System

Create and setup a search for keywords from a LexSense in the Semantic Domain list.

Protected Methods

Method Description
DoesInputMatchWord ( IEnumerable wordsToLookIn ) : MatchingResult

Looks through a list of words and searches with multiple keys to find the best matching result between keys and words.

GetDomainNameString ( ICmSemanticDomain domain ) : string

Get the text from a Semantic Domain's Name field. This version uses AnalysisDefault ws which may not always have a value (i.e. be prepared for a null return value).

GetExampleWordTextFromDomainQuestion ( ICmDomainQ questionObject ) : string

For one Semantic Domain question, return the text of the Example Words field. This subclass version uses AnalysisDefault, which could have a null value (i.e. be prepared to handle a null return value).

Private Methods

Method Description
AddKeysFrom ( IMultiAccessorBase ms, Dictionary results, int maxWords ) : void

For each ws in ms, add to the set of strings under that key in results the words from that alternative. If the alternative contains more than maxWords words, skip it.

GetSearchKeysFromSense ( ) : HashSet>.Dictionary
PutDomainInDesiredBucket ( ICmSemanticDomain domain ) : void

Method Details

DoesInputMatchWord() protected method

Looks through a list of words and searches with multiple keys to find the best matching result between keys and words.
protected DoesInputMatchWord ( IEnumerable wordsToLookIn ) : MatchingResult
wordsToLookIn IEnumerable
return MatchingResult

GetDomainNameString() protected method

Get the text from a Semantic Domain's Name field. This version uses AnalysisDefault ws which may not always have a value (i.e. be prepared for a null return value).
protected GetDomainNameString ( ICmSemanticDomain domain ) : string
domain ICmSemanticDomain
return string

GetExampleWordTextFromDomainQuestion() protected method

For one Semantic Domain question, return the text of the Example Words field. This subclass version uses AnalysisDefault, which could have a null value (i.e. be prepared to handle a null return value).
protected GetExampleWordTextFromDomainQuestion ( ICmDomainQ questionObject ) : string
questionObject ICmDomainQ
return string

SenseSearchStrategy() public method

Create and setup a search for keywords from a LexSense in the Semantic Domain list.
public SenseSearchStrategy ( FdoCache cache, ILexSense sense ) : System
cache FdoCache
sense ILexSense
return System