plint

French poetry validator
git clone https://a3nm.net/git/plint/
Log | Files | Refs | README

README (3963B)


      1 plint -- a French poetry validator
      2 Copyright (C) 2011-2012 by Antoine Amarilli
      3 
      4 == 0. Licence ==
      5 
      6 This program is free software: you can redistribute it and/or modify it under
      7 the terms of the GNU General Public License as published by the Free Software
      8 Foundation, version 3.
      9 
     10 This program is distributed in the hope that it will be useful, but WITHOUT ANY
     11 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
     12 PARTICULAR PURPOSE.  See the GNU General Public License for more details.
     13 
     14 You should have received a copy of the GNU General Public License along with
     15 this program (see file "COPYING").  If not, see <http://www.gnu.org/licenses/>.
     16 
     17 bottle.py is a third-party file, its license is in file LICENSE_bottle.
     18 
     19 test/boileau and test/andromaque are from Wikisource and test/baudelaire and
     20 test/mithridate are from Project Gutenberg. Both of them are in the public
     21 domain.
     22 
     23 == 1. Features ==
     24 
     25 plint is a tool to check French poetry. Specifically, it validates metric,
     26 rhymes and rhyme genres against an unexpressive template language. It features a
     27 command-line interface, an IRC wrapper (for use with irctk) and a web interface.
     28 It depends on haspirater <https://a3nm.net/git/haspirater> and frhyme
     29 <https://a3nm.net/git/frhyme>, and the web interface requires CherryPy.
     30 
     31 The full documentation of plint's features is available in views/about.html.
     32 
     33 == 2. Setup ==
     34 
     35 First, make sure that you have a working python3 installation and that you have
     36 unzip (Debian packages: python3, unzip).
     37 
     38 Place haspirater.py and haspirater.json from haspirater in the main directory.
     39 Place frhyme.py and frhyme.json from frhyme in the main directory (see frhyme's
     40 README for instructions on how to generate frhyme.json). Generate the
     41 occurrences file as follows:
     42 
     43   ./lexique_occurrences_retrieve.sh > occurrences
     44 
     45 For locale support, install gettext (Debian package: gettext) and run:
     46 
     47   make
     48 
     49 == 3. Usage ==
     50 
     51 To use the program's command-line interface, run:
     52 
     53   ./plint.py TEMPLATE
     54 
     55 where TEMPLATE is the template file, and provide the poem on stdin. Errors are
     56 reported on stderr.
     57 
     58 To run the web interface on port 5000, run plint_web.py. CherryPy is required
     59 (but the code is easy to adapt), see
     60 http://bottlepy.org/docs/dev/tutorial.html#deployment
     61 Beware, if you use CherryPy under Debian, simply installing python-cherrypy3
     62 might not work ("no module named cherrypy"). In this case, you need to install
     63 CherryPy by hand from source (sudo python3 setup.py install).
     64 
     65 An undocumented IRC interface for use with irctk is available (plint_irc.py).
     66 The poem that it produces can be compiled to HTML automatically using something
     67 along the lines of:
     68 
     69   while true
     70   do
     71     inotifywait poem_file
     72     # www/ should contain style.css
     73     poem2html/make_poem.sh poem_file > www/poem.html
     74   done
     75 
     76 To run plint on some provided test files, you can use test.sh. However, because
     77 of known bugs, some errors will be reported on the test files. To run a very
     78 simple test suite, run ./versetest.py; they should all pass.
     79 
     80 == 4. Training ==
     81 
     82 The diaeresis pattern "diaeresis.json" is trained by calling
     83 
     84   ./train_diaeresis.sh > diaeresis.json
     85 
     86 You can also train a specific pattern for _Cyrano de Bergerac_ with:
     87 
     88   ./train_diaeresis.sh _full ../additions_cyrano > diaeresis_cyrano.json
     89 
     90 This is currently undocumented. The plint folder should contain a copy of the
     91 haspirater code (possibly as a symlink) in "haspirater/".
     92 
     93 == 5. Related work ==
     94 
     95 * http://pentametron.com/
     96 * http://virga.org/cvf/alexanql.php
     97 * http://hal.archives-ouvertes.fr/docs/00/37/73/48/PDF/1.Rythme_et_rime_de_l_alexandrin_classique_-_V_Beaudouin_2000.pdf
     98 * http://www.oulipo.net/docannexe/file/16251/MetreenregleRFLA-Beaudouin200405.pdf
     99 * http://images.math.cnrs.fr/Je-demeurai-longtemps-errant-dans.html
    100 * Beaudouin V. & Yvon F. (1996). "The Metrometer : a Tool for Analysing French Verse", Literary & Linguistic Computing, vol. 11, n°1, p. 23-32.
    101 * http://corpus.revues.org/290
    102