<commit_before>openstreetmap-carto-typos
=========================

Search for typos in openstreetmap cartocss stylesheets. This searches for key-value tag selectors in cartocss files and cross-checks those with the taginfo database.

Installation
------------

1. install sqlite3 module
  
        npm install sqlite3
  
2. grab taginfo database files
  
        wget http://taginfo.openstreetmap.org/download/taginfo-master.db.bz2
        wget http://taginfo.openstreetmap.org/download/taginfo-wiki.db.bz2
  
3. unpack taginfo db
  
        bzip2 -d *.bz2

Running
-------

    node typo.js <path to carto stylesheet.mss>
<commit_msg>make clear where downloaded files should be placed<commit_after>openstreetmap-carto-typos
=========================

Search for typos in openstreetmap cartocss stylesheets. This searches for key-value tag selectors in cartocss files and cross-checks those with the taginfo database.

Installation
------------

1. install sqlite3 module
  
        npm install sqlite3
  
2. grab taginfo database files
  
        wget http://taginfo.openstreetmap.org/download/taginfo-master.db.bz2
        wget http://taginfo.openstreetmap.org/download/taginfo-wiki.db.bz2
  
3. unpack taginfo db
  
        bzip2 -d *.bz2

Running
-------

    node typo.js <path to carto stylesheet.mss>

Database files must be in the directory from which you call the node command
{'fraction_non_alphanumeric': 0.11976911976911978, 'fraction_numerical': 0.012987012987012988, 'mean_word_length': 2.962857142857143, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7670964', 'n_tokens_mistral': 442, 'n_tokens_neox': 404, 'n_words': 131}