Talk:Dinesman's multiple-dwelling problem: Difference between revisions

From Rosetta Code
Content added Content deleted
(→‎Why stated like that?: Futile exageration?)
Line 9: Line 9:


:About the python solution: parsing natural language is FUTILE unless you specify a clear subset of English language you are going to use. Is your program able to parse "A lives somewhere below B"? Or "A's floor is no higher than 4"? Or if one of the characters involved is in fact named "Mr. Floor?" I don't think one should go on writing a parser without a clear spec of what text might be involved. --[[User:Ledrug|Ledrug]] 00:47, 26 June 2011 (UTC)
:About the python solution: parsing natural language is FUTILE unless you specify a clear subset of English language you are going to use. Is your program able to parse "A lives somewhere below B"? Or "A's floor is no higher than 4"? Or if one of the characters involved is in fact named "Mr. Floor?" I don't think one should go on writing a parser without a clear spec of what text might be involved. --[[User:Ledrug|Ledrug]] 00:47, 26 June 2011 (UTC)
::Hmm [http://oxforddictionaries.com/definition/futile futile]? I think not. But I did recognise a need to state the extent of the language recognised but chose, out of expediency, to instead state some of the variations allowed and give a single extra example. The type of variation allowed and showed in the Python example, such as not relying on fixed names is more than that shown in some other examples. --[[User:Paddy3118|Paddy3118]] 01:13, 26 June 2011 (UTC)

Revision as of 01:13, 26 June 2011

Why stated like that?

Remember those maths essay problems from school? Remember your teacher saying "It's not just getting the right answer that is important - it's how you got to it that gets the full marks"? Well this, I hope, is that kind of problem.
The idea is for examples to be able to vary names, numbers, constraints; and for the example's problem statement and answers to be easy to recognise from the task's problem description (or variants of).
If someone wants to implement natural language processing, be my guest. If someone wants to use a syntax more familiar to constraint programmers then that can be done too, (but think of the likely audience). --Paddy3118 08:37, 25 June 2011 (UTC)

This is one of the few tasks that I have set where I don't have a canned answer in Python before setting the task. Well, not really; Pythons solution in Amb#Python is easilly adapted. --Paddy3118 08:42, 25 June 2011 (UTC)

Heh there's no way to reliably parse English text, unless the text is restricted to be following some syntax rules. The question is rather, are you more interested in seeing how people provide methods for flexible input, or how people solve the dwelling problem? Which is the emphasis of this task? --Ledrug 08:46, 25 June 2011 (UTC)
I thought finding a solution is no problem - brute force it if you must. The emphasis should be on stating the problem and presenting the resultw.r.t. the problem as stated. I tried to give hints that parsing the text of the problem statement allowing for variability, as well as stating what that variability is, is an avenue one might want to follow. The right answer is expected. How you get to it is very important. --Paddy3118 17:20, 25 June 2011 (UTC)
About the python solution: parsing natural language is FUTILE unless you specify a clear subset of English language you are going to use. Is your program able to parse "A lives somewhere below B"? Or "A's floor is no higher than 4"? Or if one of the characters involved is in fact named "Mr. Floor?" I don't think one should go on writing a parser without a clear spec of what text might be involved. --Ledrug 00:47, 26 June 2011 (UTC)
Hmm futile? I think not. But I did recognise a need to state the extent of the language recognised but chose, out of expediency, to instead state some of the variations allowed and give a single extra example. The type of variation allowed and showed in the Python example, such as not relying on fixed names is more than that shown in some other examples. --Paddy3118 01:13, 26 June 2011 (UTC)