Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No confindence levels in query output (with solution) #73

Open
noxqs opened this issue Jul 1, 2022 · 0 comments
Open

No confindence levels in query output (with solution) #73

noxqs opened this issue Jul 1, 2022 · 0 comments
Labels
enhancement New feature or request python Relates to the Python version of TRP

Comments

@noxqs
Copy link

noxqs commented Jul 1, 2022

I would like to know the confidence level of query results, however this is not made available.
I suggest to make a small change to get_query_answers in trp2.py:

  def get_query_answers(self, page: TBlock) -> List[List[str]]:
        result_list: List[List[str]] = list()
        for query in self.queries(page=page):
            answers = [x for x in self.get_answers_for_query(block=query)]
            if answers:
                for answer in answers:
                    result_list.append([query.query.text, query.query.alias, answer.text, answer.confidence])
            else:
                result_list.append([query.query.text, query.query.alias, "", 0])

This will make confidence available as fourth item in the return list and maintains compatibility with previous output.

@athewsey athewsey added enhancement New feature or request python Relates to the Python version of TRP labels Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request python Relates to the Python version of TRP
Projects
None yet
Development

No branches or pull requests

2 participants