Some other functions

Entity Extraction, Linking, Classification, and Tagging for Social Media: A Wikipedia-Based Approach.

KBFunctions.py

From the Web Information Retrieval's project


In the navbar you can find all the code names with their explanation.

Many functions!

In this python file there are many functions used during the development of the project

Among the functions written in the file, I will explain in details only the one used in the final application, going through the code. For the others I will put only a description of what that function does, avoding the functions that just print a list of nodes or write a .csv file, there are different of those, depending of which kind of version of the dataset we have to read: the unlabeled one, the one with more than one tag or the one with just one class.

Function: search

This function search for a particular node in the GKG.

See documentation
Function: createListOfNodes

This function put the nodes in a list.

See documentation
Function: takeTheFirstNode

This function returns as output the first node of the GKG for a certain query.

No documentation link:(
Function: createIDSet

This function creates the set of nodeID, since with sets it is easier to see containment of one node into another lineage.

No documentation link:(
Function: tweetTag

This function returns the set of tags that better describes the tweet.

See documentation
Function: getTypes

This function takes as input a list of entities and returns the list of their own types.

No documentation link:(
Function: commonNodes

This function returns a list containing common nodes of two different lineages l1 and l2, represented by two lists; then the new score is computed and it is obtained by adding the two score, s1 + s2. The formula on the paper does not apply since the scores are not percentage.

See documentation