C# Class mergedServices.util

Afficher le fichier Open project: sherifkandeel/weet-it_WCF Class Usage Examples

Méthodes publiques

Свойство Type Description
allowedURIs List

Méthodes publiques

Méthode Description
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

Private Methods

Méthode Description
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

Method Details

GetQuestionType() public static méthode

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
Résultat List

ReadFile() public static méthode

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.
Résultat List

URIToSimpleString() public static méthode

convert list of URIs to simple string list
public static URIToSimpleString ( List URIs ) : List
URIs List list of URIs
Résultat List

URIToSimpleString() public static méthode

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
Résultat string

UrlEncode() public static méthode

Encodes URIs
public static UrlEncode ( string value ) : string
value string the input url to be encoded
Résultat string

clearLog() public static méthode

empty the log file
public static clearLog ( ) : void
Résultat void

computeLevenshteinDistance() public static méthode

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

encodeURI() public static méthode

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

getIgnoreStrings() public static méthode

more strings to be added
public static getIgnoreStrings ( ) : List
Résultat List

getLabel() public static méthode

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
Résultat string

isInternalURI() public static méthode

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

loadAllowedLabels() public static méthode

loading the allowed uris of our database
public static loadAllowedLabels ( ) : List
Résultat List

log() public static méthode

log text to the log file
public static log ( string s ) : void
s string string to be logged in the Logfile
Résultat void

mapQuestionType() public static méthode

maps the string of question type to enum type
public static mapQuestionType ( string type ) : util.questionTypes
type string string of question type
Résultat util.questionTypes

match() public static méthode

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
Résultat bool

match() public static méthode

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
Résultat bool

Property Details

allowedURIs public_oe static_oe property

public static List allowedURIs
Résultat List