Skip to content
polyglot-quiz generates simple questionaries for linguistics.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


It helps *lazy linguistics to generate simple questionaries for any purposes.

Basically, it takes a text in any language then produce number of questions by given grammar subject.


$ git clone
$ cd polyglot-quiz
$ pip install -r requirements.txt
$ python


>>> from quiz import PolyglotQuiz

>>> text = open('anystory.txt', 'rt').read()
>>> # IN --> Preposition or subordinating conjunction
>>> polyglot = PolyglotQuiz(text, _type='IN', regexp=r'\w+')
>>> polyglot.generate_quiz()
Q.1) Cinderella, who saw all this, and
knew her slipper, said to them, laughing:
"Let me see ___ it will not fit me."

    a) out  b) if  c) unknown  d) among
Q.2) They threw themselves at her feet to beg pardon ___ all the
ill-treatment they had made her undergo.

    a) for  b) As  c) without  d) behind

Q.3) The guards ___ the palace gate were asked: 
If they had not seen a princess go out.

    a) at  b) after  c) appear  d) among

A.1) if  A.2) for  A.3) at


Please see full list of part of speech tags to generate different types of questionaries:

Or learn more details about tags by following method:

>>> polyglot.read_manual()

*note: thanks to NLTK.

You can’t perform that action at this time.