3 ms·
What is a use-case for parsing out sentences? I don't think I've ever had to do that. So curious when do you need to parse out sentences?
by distcs 3y ago
What is a use-case for parsing out sentences? I don't think I've ever had to do that. So curious when do you need to parse out sentences?
- yellowapple 3y agoMost common for me would be keyboard navigation in text editors. Emacs, for example, assumes double-spaced sentences by default when using M-a / M-e / M-k / C-x DEL for sentence-based navigation/editing: https://www.gnu.org/software/emacs/manual/html_node/emacs/Sentences.html https://www.gnu.org/software/emacs/manual/html_node/emacs/Se... Being able to count sentences per paragraph, words per sentence, etc. is also handy for maintaining good writing style. Excessively-long sentences or paragraphs can be trickier for folks to read; having solid metrics around sentence/paragraph length helps identify candidates for simplification.
- unsignedint 3y agoWhile I cannot comment on the specific use cases mentioned by the previous person, one example where parsing out sentences can be useful is in the context of Computer Aided Translation (CAT) tools, also known as translation memory. As a software engineer in the field of localization, I encounter this requirement on a daily basis. In CAT tools, there are well-established heuristics that handle the majority of cases, making sentence parsing relatively problem-free. For the remaining cases, reputable CAT solutions provide features that allow translators to merge or split segments, thus accommodating various sentence structures. As a result, this issue is generally not a significant concern. It is unreasonable to expect or demand that individuals discard their writing styles solely for the purpose of text processing, especially when both styles are equally prevalent. The blame, if any, lies with the limitations of the language itself for not providing clearer guidelines in this regard.