Talk:Determine sentence type: Difference between revisions

 
(3 intermediate revisions by 3 users not shown)
Line 38:
 
:If it was a pre-requisite that tasks be grammatically and semantically correct, about half (or more) of the existing tasks would not exist. While I don't disagree about the suspect task text, or the (lack of) coverage of edge conditions, whining about it without proposing any alternatives is counter-productive. To be fair, just about any rule you could come up regarding the structure and layout of English (American or otherwise) has some counter-example, so it will be difficult to come up with a comprehensive solution. The Lingua::EN::Sentence module used in the Raku entry has several large tables of abbreviations, grammatical constructs, and exceptions to try to intelligently break blocks of text into sensible sentences; but even that is probably only about 95-98% accurate, especially if you start throwing deliberately obfuscatory constructs at it. Is it good enough? Depends on your set of circumstances. Is is better than a few regexes? I would hope so, but again, depends on your requirements. --[[User:Thundergnat|Thundergnat]] ([[User talk:Thundergnat|talk]]) 17:24, 8 November 2021 (UTC)
 
:: Sooner or later we will be seeing junk/ironic tasks generated by GPT-3, or something like it.
:: I don't ''think'' this has started yet, but we do seem to be falling into some kind of hyper-inflationary gravity well or general collapse of quality. I don't know why ...
:: Time to think about making the pre-requisites fractionally more visible and robust ?
:: Triage by punctuation mark seems to lack a certain something ... [[User:Hout|Hout]] ([[User talk:Hout|talk]]) 19:40, 8 November 2021 (UTC)
 
:I hope you are not accusing me of "whining about it without proposing any alternatives" and being "counter-productive". I proposed 2 alternatives, one following English grammatical conventions and one following American grammatical conventions. The task author wrote the task description using 5 sentences, only one of which had End of Sentence Punctuation, an exclamation mark. I have followed your suggestion and added End of Sentence Punctuation using English grammatical conventions. Note that the task now does not make sense, there is no such thing as Neutral Sentence Type. Every sentence must have End of Sentence Punctuation, even in American!--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 14:07, 9 November 2021 (UTC)
 
::You are right about "Neutral sentences", but is there such a thing as a Serious sentence either ?
::Your change has invalidated several (most ?) of the existing samples, including that of the task author, also making it impossible to detect a "neutral sentence" (which appears to be defined for the task as something that does't end in ?, ! or .).
::The task doesn't specify that the sentebces are English or American or anything else.
::Would it be better if the task said:
:::
:::Parse the following according to this (somewhat informal) grammar:
::::<code>paragraph = sentence+ neutral-sentence?</code>
::::<code>sentence = ( exclamation | question | serious )</code>
::::<code>exclamation = neutral-sentence "!"</code>
::::<code>question = neutral-sentence "?"</code>
::::<code>serious = neutral-sentence "."</code>
::::<code>neutral-sentence = <any-character-except-?!.>+</code>
:::
:::(postfix ? means optional, postfix + means 1-or-more, things in double-quotes indicate literal characters that must appear as written.
:::The names of the terminals and non-terminals in the grammar should not be interpreted as conferring any meaning as words in any particular natural language, even if they are spelt the same way (apart from "any-character-except-..."). --[[User:Tigerofdarkness|Tigerofdarkness]] ([[User talk:Tigerofdarkness|talk]]) 18:47, 9 November 2021 (UTC)
 
::It would not. This is just a complicated way of expressing the algorithm, give a string S for each character C in S if C is '.' output 'S', if C is '!' output 'E', if C is '?' output 'Q'. If the last character in S is not one of '.', '?', or '!' output 'N'. The string could be "xxxxxxx.xxxxxx?xxxx!xxxx", this 'task' has nothing to do with sentences! --[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 17:51, 11 November 2021 (UTC)
2,171

edits