unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#4565: 23.1.50; [Patch] The doctor thinks that "family" is an adverb
@ 2009-09-27 14:57 ` Ulrich Mueller
  2009-10-17  3:20   ` bug#4565: marked as done (23.1.50; [Patch] The doctor thinks that "family" is an adverb) Emacs bug Tracking System
  0 siblings, 1 reply; 2+ messages in thread
From: Ulrich Mueller @ 2009-09-27 14:57 UTC (permalink / raw)
  To: emacs-pretest-bug

When calling "psychoanalyze-pinhead" in Emacs from today's CVS trunk,
but with the yow.lines file restored from Emacs 21, it stops at a
phrase containing the word "family".

To reproduce:
   $ emacs -Q
   M-x doctor RET
   While I'm in LEVITTOWN I thought I'd like to see the NUCLEAR FAMILY!!
   RET RET

Actual behaviour:
   Minibuffer prompt "family what ?" appears.

Expected behaviour:
   Doctor printing an answer like "Tell me something about your family."

The problem is in function doctor-adverbp which recognises all words
ending with "ly" as adverbs. The patch included below fixes it for
some common words.

(Actually, there are many more non-adverbs ending with "ly". I've
limited it to words contained in the list of 850 words of Ogden's
Basic English, or in yow.lines.)

Ulrich


2009-09-27  Ulrich Mueller  <ulm@gentoo.org>

	* play/doctor.el (doctor-adverbp): Exclude some common nouns.

--- emacs-orig/lisp/play/doctor.el
+++ emacs/lisp/play/doctor.el
@@ -1190,7 +1190,8 @@
 (defun doctor-adverbp (xx)
   (let ((xxstr (doctor-make-string xx)))
     (and (>= (length xxstr) 2)
-	 (string-equal (substring (doctor-make-string xx) -2) "ly"))))
+	 (string-equal (substring (doctor-make-string xx) -2) "ly")
+	 (not (memq xx '(family fly jelly rally))))))
 
 (defun doctor-articlep (x)
   (memq x '(the a an)))





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#4565: marked as done (23.1.50; [Patch] The doctor thinks that "family" is an adverb)
  2009-09-27 14:57 ` bug#4565: 23.1.50; [Patch] The doctor thinks that "family" is an adverb Ulrich Mueller
@ 2009-10-17  3:20   ` Emacs bug Tracking System
  0 siblings, 0 replies; 2+ messages in thread
From: Emacs bug Tracking System @ 2009-10-17  3:20 UTC (permalink / raw)
  To: Glenn Morris

[-- Attachment #1: Type: text/plain, Size: 913 bytes --]

Your message dated Fri, 16 Oct 2009 23:10:43 -0400
with message-id <tezl7qemvg.fsf@fencepost.gnu.org>
and subject line Re: Bug#4565; [Patch] The doctor thinks that "family" is an adverb
has caused the Emacs bug report #4565,
regarding 23.1.50; [Patch] The doctor thinks that "family" is an adverb
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com
immediately.)


-- 
4565: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=4565
Emacs Bug Tracking System
Contact owner@emacsbugs.donarmstrong.com with problems

[-- Attachment #2: Type: message/rfc822, Size: 3671 bytes --]

From: Ulrich Mueller <ulm@gentoo.org>
To: emacs-pretest-bug@gnu.org
Subject: 23.1.50; [Patch] The doctor thinks that "family" is an adverb
Date: Sun, 27 Sep 2009 16:57:56 +0200
Message-ID: <19135.32116.624421.695685@a1i15.kph.uni-mainz.de>

When calling "psychoanalyze-pinhead" in Emacs from today's CVS trunk,
but with the yow.lines file restored from Emacs 21, it stops at a
phrase containing the word "family".

To reproduce:
   $ emacs -Q
   M-x doctor RET
   While I'm in LEVITTOWN I thought I'd like to see the NUCLEAR FAMILY!!
   RET RET

Actual behaviour:
   Minibuffer prompt "family what ?" appears.

Expected behaviour:
   Doctor printing an answer like "Tell me something about your family."

The problem is in function doctor-adverbp which recognises all words
ending with "ly" as adverbs. The patch included below fixes it for
some common words.

(Actually, there are many more non-adverbs ending with "ly". I've
limited it to words contained in the list of 850 words of Ogden's
Basic English, or in yow.lines.)

Ulrich


2009-09-27  Ulrich Mueller  <ulm@gentoo.org>

	* play/doctor.el (doctor-adverbp): Exclude some common nouns.

--- emacs-orig/lisp/play/doctor.el
+++ emacs/lisp/play/doctor.el
@@ -1190,7 +1190,8 @@
 (defun doctor-adverbp (xx)
   (let ((xxstr (doctor-make-string xx)))
     (and (>= (length xxstr) 2)
-	 (string-equal (substring (doctor-make-string xx) -2) "ly"))))
+	 (string-equal (substring (doctor-make-string xx) -2) "ly")
+	 (not (memq xx '(family fly jelly rally))))))
 
 (defun doctor-articlep (x)
   (memq x '(the a an)))


[-- Attachment #3: Type: message/rfc822, Size: 1467 bytes --]

From: Glenn Morris <rgm@gnu.org>
To: 4565-done@emacsbugs.donarmstrong.com
Subject: Re: Bug#4565; [Patch] The doctor thinks that "family" is an adverb
Date: Fri, 16 Oct 2009 23:10:43 -0400
Message-ID: <tezl7qemvg.fsf@fencepost.gnu.org>


Thanks; applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-10-17  3:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <tezl7qemvg.fsf@fencepost.gnu.org>
2009-09-27 14:57 ` bug#4565: 23.1.50; [Patch] The doctor thinks that "family" is an adverb Ulrich Mueller
2009-10-17  3:20   ` bug#4565: marked as done (23.1.50; [Patch] The doctor thinks that "family" is an adverb) Emacs bug Tracking System

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).