Python code that scrapes and builds a table of verb conjugations and boolean verb irregularities for the Portuguese language. An example of the exploration and analyses that can be done using this code can be found in the demo ipython notebook about the L-shaped morphome.
I have pre-built verb tables for both conjugations and boolean-irregularities, for the 50 highest frequency verbs in Portuguese. You can download them here as a two sheet spreadhsheet on google drive or as two csvs of conjugations and of irregularities. If you'd like to run the python code to generate the tables on your own system, proceed to Getting Started.
These instructions will get you the project up and running on your local machine. At the moment, this project only supports Linux and Mac machines.
This project is created with Python, and uses Miniconda as a package manager. As part of the Miniconda install, Python is installed. As such, the only prerequisite is Miniconda.
Once the Miniconda installation is complete and this repository is cloned to your local machine, open up a terminal process, navigate to the cloned pt-verb-explorer
directory and run the following commands:
conda env create -f environment.yml
conda activate pt-verb-explorer
conda env config vars set VERB_TABLE_BUILDER_HOME=`pwd`
conda activate pt-verb-explorer
(yes, this has to be run twice :o)
In the pt-verb-explorer
directory and with the conda environment pt-verb-explorer
activated, execute the following command:
python run.py
The resulting verb tables will be stored as csvs in pt-verb-explorer/data/verb-tables/
.
If you'd like to build the verb tables using more verbs than the default top 50 verbs, then more verbs can be added to the list at pt-verb-explorer/data/verb-list/50_top_verbs.json
.
Check out the ipython notebook demo about the L-shaped morphome in order to get comfortable with using the verb tables.
- This code scrapes data from the Portuguese verb conjugation website Conjugação do Verbos.