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

More verbose logging output for compare m2 #29

Merged
merged 2 commits into from
Apr 14, 2022

Conversation

sam-writer
Copy link
Contributor

@sam-writer sam-writer commented Aug 24, 2021

I have found the following additional information useful when using the verbose output of ERRANT, and wanted to see if you were interested in merging it.

It adds:

  • the original sentence
  • the category of each hypothesis and reference edit
  • a summary table of categories and TP/FP/FN

Example verbose output now looks like

----------------------------------------
Original sentence 8: Would you like   me to see if I can get a coy of the quote ?
----------------------------------------
SENTENCE 8 - HYP 0 - REF 0
HYPOTHESIS EDITS : [(3, 4, '', 'U:SPACE'), (12, 13, 'copy', 'R:NOUN')]
REFERENCE EDITS  : [(3, 4, '', 'U:SPACE'), (12, 13, 'copy', 'R:NOUN'), (17, 17, '( SOMETHING ELSE )', 'M:OTHER')]
Local TP/FP/FN   : 2 0 1
Local P/R/F0.5  : 1.0 0.6667 0.9091
Global TP/FP/FN  : 5 1 7
Global P/R/F0.5  : 0.8333 0.4167 0.6944
----------------------------------------
SENTENCE 8 - HYP 0 - REF 1
HYPOTHESIS EDITS : [(3, 4, '', 'U:SPACE'), (12, 13, 'copy', 'R:NOUN')]
REFERENCE EDITS  : [(3, 4, '', 'U:SPACE'), (12, 13, 'copy', 'R:NOUN'), (17, 17, '( SOMETHING ELSE  )', 'M:OTHER')]
Local TP/FP/FN   : 2 0 1
Local P/R/F0.5  : 1.0 0.6667 0.9091
Global TP/FP/FN  : 5 1 7
Global P/R/F0.5  : 0.8333 0.4167 0.6944
----------------------------------------
SENTENCE 8 - HYP 0 - REF 2
HYPOTHESIS EDITS : [(3, 4, '', 'U:SPACE'), (12, 13, 'copy', 'R:NOUN')]
REFERENCE EDITS  : [(3, 4, '', 'U:SPACE'), (12, 13, 'copy', 'R:NOUN'), (17, 17, '( SOMETHING ELSE  )', 'M:OTHER')]
Local TP/FP/FN   : 2 0 1
Local P/R/F0.5  : 1.0 0.6667 0.9091
Global TP/FP/FN  : 5 1 7
Global P/R/F0.5  : 0.8333 0.4167 0.6944
----------------------------------------
SENTENCE 8 - HYP 0 - REF 3
HYPOTHESIS EDITS : [(3, 4, '', 'U:SPACE'), (12, 13, 'copy', 'R:NOUN')]
REFERENCE EDITS  : [(3, 4, '', 'U:SPACE'), (12, 13, 'copy', 'R:NOUN'), (17, 17, '( SOMETHING ELSE  )', 'M:OTHER')]
Local TP/FP/FN   : 2 0 1
Local P/R/F0.5  : 1.0 0.6667 0.9091
Global TP/FP/FN  : 5 1 7
Global P/R/F0.5  : 0.8333 0.4167 0.6944
----------------------------------------
SENTENCE 8 - HYP 0 - REF 4
HYPOTHESIS EDITS : [(3, 4, '', 'U:SPACE'), (12, 13, 'copy', 'R:NOUN')]
REFERENCE EDITS  : [(3, 4, '', 'U:SPACE'), (12, 13, 'copy', 'R:NOUN'), (17, 17, '( SOMETHING ELSE  )', 'M:OTHER')]
Local TP/FP/FN   : 2 0 1
Local P/R/F0.5  : 1.0 0.6667 0.9091
Global TP/FP/FN  : 5 1 7
Global P/R/F0.5  : 0.8333 0.4167 0.6944
----------------------------------------
^^ HYP 0, REF 0 chosen for sentence 8
Local results:
   Category   TP   FP   FN
    U:SPACE    1    0    0
     R:NOUN    1    0    0
    M:OTHER    0    0    1

@chrisjbryant
Copy link
Owner

Hi Sam, sorry it took so long but merging this now. Hope you're well!

@chrisjbryant chrisjbryant merged commit 0dc0848 into chrisjbryant:master Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants