nltk doesn’t add $NLTK_DATA to search path?

If you don’t want to set the $NLTK_DATA before running your scripts, you can do it within the python scripts with: import nltk nltk.path.append(‘/home/alvas/some_path/nltk_data/’) E.g. let’s move the the nltk_data to a non-standard path that NLTK won’t find it automatically: alvas@ubi:~$ ls nltk_data/ chunkers corpora grammars help misc models stemmers taggers tokenizers alvas@ubi:~$ mkdir some_path … Read more

How to check if a table exists in a given schema

It depends on what you want to test exactly. Information schema? To find “whether the table exists” (no matter who’s asking), querying the information schema (information_schema.tables) is incorrect, strictly speaking, because (per documentation): Only those tables and views are shown that the current user has access to (by way of being the owner or having … Read more

How does the search_path influence identifier resolution and the “current schema”

What is the schema search path search_path? The manual: […] tables are often referred to by unqualified names, which consist of just the table name. The system determines which table is meant by following a search path, which is a list of schemas to look in. Bold emphasis mine. This explains identifier resolution. The “current … Read more