ProjetPP / PPP-QuestionParsing-Grammatical

Question Parsing module for the PPP using a grammatical approch
GNU Affero General Public License v3.0
33 stars 11 forks source link

Noun db #129

Closed Ezibenroc closed 9 years ago

Ezibenroc commented 9 years ago

Improve class Nounificator:

Ezibenroc commented 9 years ago

@ProgVal: I try to have a good programming style. Could you please check this pull request (especially the class Nounificator) and tell me if you see some weird things that should be changed?

yhamoudi commented 9 years ago

i would be nice to have shortest names for the functions (otherwise it's painful to use them)

yhamoudi commented 9 years ago

Why not: D instead of Direct and I instead of Inverse ("reverse" needs to be replaced by "inverse", i didn't know that "reverse" was still used in this file)

Ezibenroc commented 9 years ago

i would be nice to have shortest names for the functions (otherwise it's painful to use them)

See this comment of @Tpt at the beginning of the project :)

yhamoudi commented 9 years ago

Can we have autocompletion when we update the database from the terminal?

Ezibenroc commented 9 years ago

Can we have autocompletion when we update the database from the terminal?

sudo aptitude install ipython3
ipython3

Enjoy!

yhamoudi commented 9 years ago

Cool! So just change "reverse" to "inverse"

progval commented 9 years ago
def __str__(self):
    l = sorted([(x, 0) for x in self.verbToNounsDirect.keys()] + [(x, 1) for x in self.verbToNounsReverse.keys()])
    return '\n'.join([self.select(x) for x in sorted(l)])

l is sorted twice

Ezibenroc commented 9 years ago

Done, thank you for your remarks.

yhamoudi commented 9 years ago

Do we merge?