<commit_before># turkopticon-php-api

This is the read-only PHP API for Turkopticon, an employer review system for Amazon Mechanical Turk.

## Install and configure

1. Copy the files into an appropriate location. The files in /public should be public. The other files should not be.
2. Make sure you have installed the php5-mysqlnd package. This lets you use PHP's mysqli_* functions.
3. Rename dbconn-example.php to dbconn.php.
4. Put your database credentials into dbconn.php.
5. Make sure you have APC enabled.
6. Make the log file:

> $ cd /path/to/api/log && touch multi-attrs.php.log

7. Make sure the log can be written to. For example:

> $ cd /path/to/api/log && chmod 777 multi-attrs.php.log

8. Make sure the log won't grow forever. For example, use logrotate or make a cron job like:

> 0 0 1 * * cd /path/to/api/log && tail -n20000 multi-attrs.php.log > multi-attrs.old && echo "" > multi-attrs.log
<commit_msg>README syntax<commit_after># turkopticon-php-api

This is the read-only PHP API for Turkopticon, an employer review system for Amazon Mechanical Turk.

## Install and configure

1. Copy the files into an appropriate location. The files in /public should be public. The other files should not be.
2. Make sure you have installed the php5-mysqlnd package. This lets you use PHP's mysqli_* functions.
3. Rename dbconn-example.php to dbconn.php.
4. Put your database credentials into dbconn.php.
5. Make sure you have APC enabled.
6. Make the log file:
> $ cd /path/to/api/log && touch multi-attrs.php.log
7. Make sure the log can be written to. For example:
> $ cd /path/to/api/log && chmod 777 multi-attrs.php.log
8. Make sure the log won't grow forever. For example, use logrotate or make a cron job like:
> 0 0 1 * * cd /path/to/api/log && tail -n20000 multi-attrs.php.log > multi-attrs.old && echo "" > multi-attrs.log

{'fraction_non_alphanumeric': 0.0943089430894309, 'fraction_numerical': 0.02168021680216802, 'mean_word_length': 3.469733656174334, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3238845', 'n_tokens_mistral': 598, 'n_tokens_neox': 565, 'n_words': 263}