Query

class matchup.structure.query.Query(*, vocabulary)

Bases: object

Represents the Query of the IR service. The query is responsible for processing and generating user input to search a previously built create_collection

Attributes Summary

search_input Input property getter.

Methods Summary

ask(answer) Make query since a command line prompt.
search(*, model[, idf, tf]) Receive an IR model and execute the query based in user answer and the vocabulary.

Attributes Documentation

search_input
Input property getter.
Returns:

Methods Documentation

ask(answer: str = None) → None
Make query since a command line prompt.
Returns:None
search(*, model: matchup.models.model.Model = None, idf=None, tf=None) → matchup.structure.solution.Solution
Receive an IR model and execute the query based in user answer and the vocabulary.
Parameters:
  • model – ModelType that represents the IR model
  • idf – Describe the class of IDF
  • tf – Describe the class of TF
Returns:

list of solution -> (document, score)