C# 클래스 mergedServices.Lexicon

Lexicon Class which is used to act as a Triple store contains Literals and Predicates that match words in the Question it has two main functions Getpredicates , GetLiterals which returns the matching literals and predicates objects
파일 보기 프로젝트 열기: sherifkandeel/weet-it_WCF 1 사용 예제들

공개 메소드들

메소드 설명
GetStemmedWords ( string question ) : List>.Dictionary

Get all possible stems for each word in the string

Lexicon ( ) : System

constructor of the Lexicon class

getLiterals ( string question, int topN = 30, int Limit = 30 ) : List

get predicates is a method in lexicon class that get all LexiconLiterals objects that match some words in the Question

getPermutations ( string questionLeft ) : List

This function returns all permutations of a string ex: father of barack obama 1st iteration: father, of, barack, obama 2nd iteration: father of, of barack, barack obama 3rd iteration: father of barack, of barack obama 4th iteration: father of barack obama

getPredicates ( string question, int topN = 20, int Limit = 30 ) : List

get predicates is a method in lexicon class that get all predicates objects that match some words in the Question

비공개 메소드들

메소드 설명
addDomainAndRange ( List predicateList ) : List

takes the list of Predicates and add tothem the domain and Range data needed in two steps 1st : searching for direct Domain and ranges 2nd : searching for predicates who don't have domain and ranges and select the all predicates and objects get their types and add them to the domain and range field

scoreLiterals ( List results, int n ) : List

scorePredicates ( List results, int n ) : List

scoring predicates calculating the Distance between them and the matching words then returning the n ones who have the least distance

trimPermutations ( List m ) : List

after getting all permutations this function is to remove permutations that may take time during the Query and return no results

메소드 상세

GetStemmedWords() 공개 메소드

Get all possible stems for each word in the string
public GetStemmedWords ( string question ) : List>.Dictionary
question string String (question) to find its words stems
리턴 List>.Dictionary

Lexicon() 공개 메소드

constructor of the Lexicon class
public Lexicon ( ) : System
리턴 System

getLiterals() 공개 메소드

get predicates is a method in lexicon class that get all LexiconLiterals objects that match some words in the Question
public getLiterals ( string question, int topN = 30, int Limit = 30 ) : List
question string question to get matched predicates of it
topN int the number of top matching results to be returned, default = 10
Limit int the limit of the number of returned results in the query, default = 20
리턴 List

getPermutations() 공개 메소드

This function returns all permutations of a string ex: father of barack obama 1st iteration: father, of, barack, obama 2nd iteration: father of, of barack, barack obama 3rd iteration: father of barack, of barack obama 4th iteration: father of barack obama
public getPermutations ( string questionLeft ) : List
questionLeft string The certain string to enter
리턴 List

getPredicates() 공개 메소드

get predicates is a method in lexicon class that get all predicates objects that match some words in the Question
public getPredicates ( string question, int topN = 20, int Limit = 30 ) : List
question string question to get matched predicates of it
topN int the number of top matching results to be returned, default = 10
Limit int the limit of the number of returned results in the query, default = 20
리턴 List