C# 클래스 mergedServices.util

파일 보기 프로젝트 열기: sherifkandeel/weet-it_WCF 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
allowedURIs List

공개 메소드들

메소드 설명
GetQuestionType ( string question ) : List

Gets the type of the question and remove words used to match question type from the question string

ReadFile ( string filePath ) : List

Reads line of text files and return it in a list of strings.

URIToSimpleString ( List URIs ) : List

convert list of URIs to simple string list

URIToSimpleString ( string URI ) : string

returns a simple string of the URI by taking the last part of it , or the part after # if exists

UrlEncode ( string value ) : string

Encodes URIs

clearLog ( ) : void

empty the log file

computeLevenshteinDistance ( string s, string t ) : int

compute the levenstein Distance between two strings

encodeURI ( string input ) : string

SHERIF WAY OF ENCODING OUR URIS (ONLY WORKS WITH DBPEDIA AND SUCH) POSSIBLE BUG

getIgnoreStrings ( ) : List

more strings to be added

getLabel ( string URI ) : string

This method tries it's best to get a label for the wanted URI

isInternalURI ( string input ) : bool

checks to see if the uri is from our dbpedia databse

loadAllowedLabels ( ) : List

loading the allowed uris of our database

log ( string s ) : void

log text to the log file

mapQuestionType ( string type ) : util.questionTypes

maps the string of question type to enum type

match ( string s, List s2 ) : bool

returns true if match s matches 40% of any of the strings in s2 //todo :

match ( string s, string s2 ) : bool

return true if s matches 40% - or min match distance - of s2 otherwise return false

비공개 메소드들

메소드 설명
UpperCaseUrlEncode ( string s ) : string

HELPER FUNCTION FOR THE encdoeURI

addtohashset ( string URI, string label ) : void

this method adds the new labels from queries to the dataset

메소드 상세

GetQuestionType() 공개 정적인 메소드

Gets the type of the question and remove words used to match question type from the question string
public static GetQuestionType ( string question ) : List
question string Input question to check type and remove words used to match the type
리턴 List

ReadFile() 공개 정적인 메소드

Reads line of text files and return it in a list of strings.
public static ReadFile ( string filePath ) : List
filePath string The path of the file to be read.
리턴 List

URIToSimpleString() 공개 정적인 메소드

convert list of URIs to simple string list
public static URIToSimpleString ( List URIs ) : List
URIs List list of URIs
리턴 List

URIToSimpleString() 공개 정적인 메소드

returns a simple string of the URI by taking the last part of it , or the part after # if exists
public static URIToSimpleString ( string URI ) : string
URI string the URI
리턴 string

UrlEncode() 공개 정적인 메소드

Encodes URIs
public static UrlEncode ( string value ) : string
value string the input url to be encoded
리턴 string

clearLog() 공개 정적인 메소드

empty the log file
public static clearLog ( ) : void
리턴 void

computeLevenshteinDistance() 공개 정적인 메소드

compute the levenstein Distance between two strings
public static computeLevenshteinDistance ( string s, string t ) : int
s string string1
t string string2
리턴 int

encodeURI() 공개 정적인 메소드

SHERIF WAY OF ENCODING OUR URIS (ONLY WORKS WITH DBPEDIA AND SUCH) POSSIBLE BUG
public static encodeURI ( string input ) : string
input string INPUT URI
리턴 string

getIgnoreStrings() 공개 정적인 메소드

more strings to be added
public static getIgnoreStrings ( ) : List
리턴 List

getLabel() 공개 정적인 메소드

This method tries it's best to get a label for the wanted URI
public static getLabel ( string URI ) : string
URI string uri to get label to
리턴 string

isInternalURI() 공개 정적인 메소드

checks to see if the uri is from our dbpedia databse
public static isInternalURI ( string input ) : bool
input string the uri to check
리턴 bool

loadAllowedLabels() 공개 정적인 메소드

loading the allowed uris of our database
public static loadAllowedLabels ( ) : List
리턴 List

log() 공개 정적인 메소드

log text to the log file
public static log ( string s ) : void
s string string to be logged in the Logfile
리턴 void

mapQuestionType() 공개 정적인 메소드

maps the string of question type to enum type
public static mapQuestionType ( string type ) : util.questionTypes
type string string of question type
리턴 util.questionTypes

match() 공개 정적인 메소드

returns true if match s matches 40% of any of the strings in s2 //todo :
public static match ( string s, List s2 ) : bool
s string string that used to check if it matches or not
s2 List list of strings
리턴 bool

match() 공개 정적인 메소드

return true if s matches 40% - or min match distance - of s2 otherwise return false
public static match ( string s, string s2 ) : bool
s string string to be matched
s2 string string to be matched with
리턴 bool

프로퍼티 상세

allowedURIs 공개적으로 정적으로 프로퍼티

public static List allowedURIs
리턴 List