question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Question marks at the end swallowed

See original GitHub issue

Looks like the example with just question marks is good now:

>>> segmenter.segment("??")
['??']

but the example with double question marks as a token at the end of a sentence still loses the question marks:

>>> segmenter.segment("T stands for the vector transposition. As shown in Fig. ??")
['T stands for the vector transposition.', 'As shown in Fig.']

looks like this is the minimal repro:

>>> segmenter.segment("Fig. ??")
['Fig.']

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
nipunsadvilkarcommented, Oct 25, 2019

@danielkingai2 : Fixed above bug & have released char-span functionality today. Didn’t release it yday since I wanted to add tests and update docs.

1reaction
nipunsadvilkarcommented, Oct 24, 2019

Yes, I really need to come up with some assertion logic to map respective sentences to the original text. This is the main reason why I’ve been working on https://github.com/nipunsadvilkar/pySBD/tree/sentence-char-span branch because even if pysbd fails to find proper sentence. tok.is_sent_start would remain False and we will get an original text at the end

Read more comments on GitHub >

github_iconTop Results From Across the Web

Swallowed Foreign Object - Seattle Children's
Magnets at different spots can become attracted to each other across the bowel wall. The problems include a bowel puncture or blockage. All ......
Read more >
Secret role of swallowing in conversations revealed by new ...
Another is that we interpret swallows as places where speech is temporarily not possible, because swallowing makes the vocal tract unavailable ...
Read more >
Punctuation with Quotation Marks - Book Cave
Question marks, exclamation points, and em dashes can go inside or outside the quotation mark, depending on whether they're part of the quote...
Read more >
8. Punctuation - GovInfo
Quotation marks are not used on a line of asterisks in quoted matter. Where an ellipsis line ends a complete quotation, no closing...
Read more >
Where do I put the question mark if a question has a ...
So your suspicion is correct: The question mark goes at the very end, just outside the closing parenthesis. You are probably also correct...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found