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

Alignment fails when transcript TSV has a final newline #63

Open
Tracked by #62
chrisbrickhouse opened this issue Aug 29, 2022 · 0 comments
Open
Tracked by #62

Alignment fails when transcript TSV has a final newline #63

chrisbrickhouse opened this issue Aug 29, 2022 · 0 comments
Labels
bug Something broke
Milestone

Comments

@chrisbrickhouse
Copy link
Collaborator

chrisbrickhouse commented Aug 29, 2022

Some programs add a newline to the end of a text file, meaning that some transcript files end with a blank line. Currently FAVE fails when these files are input because the blank line is seen as an error, but users may not find this easy to diagnose.

Current behavior

  • main() in FAAValign.py calls aligner.check_transcript()
  • aligner.check_transcript() calls aligner.TranscriptProcessor.check_transcription_file()
  • for each line, L in the transcript file, ....check_transcription_file() calls ....check_transcription_format(L)
  • if L contains only white space, that line is marked as needing deletion (ln 284)
  • when aligner.align() is called, if there are any lines needing deletion, the alignment fails raising a ValueError (ln 164)

Desired behavior

  • Ideally the alignment should not fail if the final line is a newline, if anything we may want to just (optionally?) remove lines containing only white space since they're already identified.
  • The output should be more helpful in debugging what lines need to be removed. The program should at least give the (approx) line number to remove, and should be more helpful in its user-facing messaging. See Improve logging in TranscriptProcessor.check_transcription_file() #64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something broke
Projects
None yet
Development

No branches or pull requests

1 participant