ZoTFIDF: Adding custom tf-idf tags to your Zotero database

I wanted to add my own custom tags to my Zotero citation management database based on the term frequency—inverse document frequency (tf-idf) formula. While not perfect, this is a nice way to pick out what is distinct and important about individual texts. “external access to the SQLite database (including direct access via the mozStorage API) should be done only in a read-only manner. Modifying the database while Zotero is running can easily result in a corrupted database, as mozStorage caching breaks the normal file-locking in SQLite that allows for safe concurrent file access.