Frequently Asked Questions (FAQs)¶
Here are a collection of troubleshooting questions we’ve seen asked. If you run into anything not covered in this section, feel free to open an Issue.
When I try to createdb, or use psql, I get FATAL: role “<username>” does not exist.¶
If you just installed PostgreSQL, you probably need to add users. You will need sudo privileges to do this.
We recommend using createuser to define a new PostgreSQL user account:
$ sudo -u postgres createuser [options] [username]
How do I connect to PostgreSQL? I’m getting “fe_sendauth no password supplied”.¶
There are four main ways to deal with entering passwords when you connect to your PostgreSQL database:
PGPASSWORD=<pass> psql -h <host> -U <user>
Using a .pgpass file to store the password.
Setting the users to trust authentication in the pg_hba.conf file. This makes local development easy, but probably isn’t suitable for multiuser environments. You can find your hba file location by running:
$ sudo -u postgres psql -c "SHOW hba_file;"
Put the username and password in the connection URI:
I’m getting a CalledProcessError for command ‘pdftotext -f 1 -l 1 -bbox-layout’?¶
Are you using Ubuntu 14.04 (or older)? Fonduer requires
poppler-utils to be
0.36.0 or greater. Otherwise, the
-bbox-layout option is not
pdftotext (see changelog).
If you must use Ubuntu 14.04, you can install manually. As an example, to
$ sudo apt install build-essential checkinstall $ wget poppler.freedesktop.org/poppler-0.53.0.tar.xz $ tar -xf ./poppler-0.53.0.tar.xz $ cd poppler-0.53.0 $ ./configure $ make $ sudo checkinstall
We highly recommend using at least Ubuntu 16.04 though, as we haven’t done testing on 14.04 or older.
How can I use use Fonduer for documents in Languages other than English?¶
If available, Fonduer uses languages supported by spaCy for tokenization and its NLP pipeline (see spacy language support). We also started adding languages with spaCy alpha support for tokenization (see spacy alpha languages). Currently, only Chinese and Japanese are supported.
If you would like to use Fonduer for Japanese documents, you will first have to install some additional packages (see mecab on PyPI).
$ sudo apt-get install swig libmecab-dev $ sudo apt-get install mecab unidic-mecab
For OS X:
$ brew install swig mecab $ brew install mecab-unidic
Afterwards, you can use
pip install fonduer[spacy_ja] to install Fonduer
with Japanese language support.
If you would like to use Fonduer for Chinese documents, you can use
pip install fonduer[spacy_zh] to install Fonduer with Chinese language support.