Gismo#

Tools to make gismos. WIP

gismap.gismo.make_gismo(lab, vectorizer_parameters=None)[source]#

Makes a gismo out of a lab.

Parameters:
  • lab (Lab) – Lab that contains publications.

  • vectorizer_parameters (dict) – Overriding parameters for the Countvectorizer of the gismo.

Returns:

gismo – Gismo of the lab.

Return type:

Gismo

gismap.gismo.make_post_publi(lab)[source]#

Hook to turn publication key stored in a corpus into actual publication.

Parameters:

lab (Lab) – Lab that contains the corpus publications.

Return type:

callable

class gismap.search.Search(gismo, action_list, post=None, corrector=True)[source]#

Builds a gismo search engine.

Parameters:
  • gismo (Gismo) – Gismo to use.

  • action_list (list) – List of actions to perform.

  • post (callable, optional) – Output transformation.

  • corrector (Bool, default=True) – Implement word correction.

class gismap.search.SearchAction(name=None, post=None)[source]#

Blueprint for extracting search results out of a gismo.

class gismap.search.SearchDocuments(name='articles', post=None, k=5)[source]#

Gives k best covering articles.

class gismap.search.SearchFeatures(name='keywords', post=None)[source]#

Gives best keywords.

class gismap.search.SearchLandmarks(name='landmarks', post=None, lmks=None)[source]#

Gives best landmarks.

gismap.search.l2t(lis)[source]#
Parameters:

lis (list) – List of text.

Returns:

Concatenation, comma-separated.

Return type:

str

gismap.search.p2t(publis)[source]#
Parameters:

publis (list) – List of publications

Returns:

Publications converted in text and concatenated.

Return type:

str

gismap.search.search_to_html(res)[source]#
Parameters:

res (dict) – Raw results of search.

Returns:

HTML representation of the results.

Return type:

str

gismap.search.search_to_text(res)[source]#
Parameters:

res (dict) – Raw results of search.

Returns:

Text representation of the results.

Return type:

str