in reply to Re^2: Chatterbot update
in thread Chatterbot update

> I'm open for suggestions.

If you don't want to check individual PM nodes - i.e. roughly something like \[(\w+)\] plus whitespace - maybe at least normalize them to a standard when counting

As a second step the printed version could be the first or last or the most counted representation of the name.

Choroba could even know better, because he's also running an external agent.

Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^4: Chatterbot update
by choroba (Cardinal) on Jun 19, 2024 at 11:48 UTC
    To get the canonical name, I retrieve the page with ;displaytype=xml and extract its /node/@title (that's XPath).

    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
        And I cache the titles to minimise the number of calls.

        map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]