Talk:Reverse the gender of a string: Difference between revisions

(Added name and date)
 
Line 19:
==Linguistically impossible task==
To a linguist, this task is completely laughable on many levels. First of all, you can't reverse the gender of a string because strings don't have gender. But even allowing that the string represents a text with gender-based references, you can at best do a partial effort at each linguistic level: the morphological level, the lexical level, the semantic level, and the pragmatic level. And physiologically speaking, at some point you're going to be trying to decide whether certain sexual characteristics can be considered "opposite", which is unknowable without deep understanding of the text, since to calculate an opposite you have to know in which sense something is being taken, and only change one aspect of it. Plus all the other problems. But the lexical problems are the real killer; sometimes the opposite of "a cock" is simply "a hen". And be careful how you cock that gun... --[[User:TimToady|TimToady]] 23:56, 24 October 2012 (UTC)
 
: Do not worry. I'm sure that the text can stand quite a bit of womanhandling. (We can apply a particular set of transformations easily enough, but care would need to be taken to both respect word boundaries and to avoid input texts with the problems in your little sample. Semantic transformation is probably a Hard-AI challenge; heck, it's a big problem for people too, as I know from talking to people who do translation of novels.) –[[User:Dkf|Donal Fellows]] 09:19, 25 October 2012 (UTC)
 
::The fun detail is that the grammar of human languages is non-computable. So, that's that. I recall a girlfriend talking about a computing assignment which was to write a SNOBOL prog. that would replace all naughty words in a text by ... (or other marker); the SNOBOL source was of course densely packed with expletives and there was much comparison of lists.
::More seriously, how about a task to convert a word from singular to plural (and vice-versa?) - I am sick and tired of seeing *"1 errors" and the like, nor is "6 error(s)" much of an improvement. Aside from "errors", I have encountered a need for "days", and "mismatches", but not yet "ladies". [[User:Dinosaur|Dinosaur]] ([[User talk:Dinosaur|talk]]) 11:25, 17 May 2016 (UTC)
 
:::Five years on, this issue still stands and this task is still a draft. Might it be time to decide that a string:replace() with a gigantic list of value pairs isn't a very good fit for an illustrative RC task? [[User:FreeTom]] 2017-10-23
:::: Maybe this task should be renamed, “Replace multiple words”, and merely take pronouns as an example for a set of words. ‑‑[[User:Root|Root]] ([[User talk:Root|talk]]) 09:43, 23 May 2022 (UTC)
149

edits