problems with 'classify' in gerh

Thomas Michael Hagen <[email protected]>
Newsgroups gmane.mail.spam.crm114
Message-ID <[email protected]>
this is my fourth attempt at an osbf dstttr 19 category newspaper
article classifier.

i'm on a 64-bit machine, and have recently started using gerH builds.

this program hangs when it reaches the 'classify' statement. does it
have a new name in gerH builds, or is there some other gotcha here
that relates to gerH builds?


:try-to-classify: (:article:)
{
    {
	isolate (:stats:)
	isolate (:fail:) /1/ #distinguishes between low conf and outright fail
	classify <osbf microgroom> [:article:] \
		(bus.cfc cli.cfc con.cfc cul.cfc dom.cfc \
		eco.cfc edu.cfc ene.cfc ent.cfc env.cfc \
		for.cfc hea.cfc loc.cfc pol.cfc sci.cfc \
		spo.cfc tec.cfc tra.cfc wor.cfc | unc.cfc out.cfc) (:stats:)
	match (:: :class-conc:) [:stats:] /(...)\.cfc/
	#todo: pick the three best tags from :stats: here and send them to :interact:
	{ #classify succeeded, checking pR:
	    match (:: :pR:) [:stats:] /Best match.*: (.*)  \nTotal/
	    output /pR::*:pR:. /
	    eval /:@::*:pR: > 30:/ #play around with this number
	    output /Classify succeeded as ':*:class-conc:'\n/
	    return
	}
	output /Not confident!\n/
	isolate (:fail:) /0/
    }
    {
	match [:fail:] /1/
	output /Classify failed!\n/
    }
    isolate (:conc-file:) /:*:class-conc:.cfc/
    isolate (:interaction:) /:*:class-conc::*:article::*:stats:/
    isolate (:user-feedback:)
    call /:interact:/ [:*:interaction:] #asking the user for the right topic
    isolate (:user-feedback-conc-file:) /:*:user-feedback:.cfc/
    isolate (:count:) /12/
    { # entering the training loop
	learn <osbf microgroom> (:*:user-feedback-conc-file:) [:article:]
	output /Learned as :*:user-feedback-conc-file:\n/
	#reclassifying to check improvement:
	isolate (:stats2:)
	classify <osbf microgroom> [:article:]	\
		(bus.cfc cli.cfc con.cfc cul.cfc dom.cfc \
		eco.cfc edu.cfc ene.cfc ent.cfc env.cfc \
		for.cfc hea.cfc loc.cfc pol.cfc sci.cfc \
		spo.cfc tec.cfc tra.cfc wor.cfc | unc.cfc out.cfc) (:stats2:)
	isolate (:pR2:)
	match (:: :pR2:) [:stats2:] /Best match.*: (.*)  \nTotal/
	isolate (:improvement:)
	eval (:improvement:) /:@:(:*:pR2: - :*:pR:):/
	{
	    eval /:@::*:improvement: > 3:/
	    eval /:@::*:pR2: > 10:/ #play around with this number too
	    output /Improvement high enough, and new threshold met; NO
further action taken\n/
	    return
	} # imp wasn't high enough, and new threshold wasn't met
	isolate (:refute-args:) /:*:user-feedback-conc-file::*:article:/
	call /:refute-from-all-others:/ [:*:refute-args:] # maybe too
intense, at least at first?
	eval (:count:) /:@::*:count: - 1:/
	eval /:@::*:count: > 0:/
	liaf
    } #exiting the loop because pR never improved enough and ctr exceeded
    output /Improvement never increased enough; moving on\n/
}

------------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.