<commit_before>#!/bin/sh
export LC_ALL="en_US.UTF-8"

PROC_KEYPAD="/proc/keypad"
PROC_FIVEWAY="/proc/fiveway"
test -e $PROC_KEYPAD && echo unlock > $PROC_KEYPAD
test -e $PROC_FIVEWAY && echo unlock > $PROC_FIVEWAY

# we're always starting from our working directory
cd /mnt/us/koreader/

# export trained OCR data directory
export TESSDATA_PREFIX="data"

# bind-mount system fonts
if ! grep /mnt/us/koreader/fonts/host /proc/mounts; then
	mount -o bind /usr/java/lib/fonts /mnt/us/koreader/fonts/host
fi

# check if we are supposed to shut down the Amazon framework
if test "$1" == "--framework_stop"; then
	shift 1
	/etc/init.d/framework stop
fi

# dismiss chrome bar
lipc-set-prop com.lab126.pillow disableEnablePillow disable
# notify kpvbooklet that pillow is disabled
lipc-send-event com.github.koreader.kpvbooklet disablePillow

# stop cvm
#killall -stop cvm

# finally call reader<commit_msg>add env variable for stardict dictionary dir<commit_after>#!/bin/sh
export LC_ALL="en_US.UTF-8"

PROC_KEYPAD="/proc/keypad"
PROC_FIVEWAY="/proc/fiveway"
test -e $PROC_KEYPAD && echo unlock > $PROC_KEYPAD
test -e $PROC_FIVEWAY && echo unlock > $PROC_FIVEWAY

# we're always starting from our working directory
cd /mnt/us/koreader/

# export trained OCR data directory
export TESSDATA_PREFIX="data"

# export dict directory
export STARDICT_DATA_DIR="data/dict"

# bind-mount system fonts
if ! grep /mnt/us/koreader/fonts/host /proc/mounts; then
	mount -o bind /usr/java/lib/fonts /mnt/us/koreader/fonts/host
fi

# check if we are supposed to shut down the Amazon framework
if test "$1" == "--framework_stop"; then
	shift 1
	/etc/init.d/framework stop
fi

# dismiss chrome bar
lipc-set-prop com.lab126.pillow disableEnablePillow disable
# notify kpvbooklet that pillow is disabled
lipc-send-event com.github.koreader.kpvbooklet disablePillow

# stop cvm
#killall -stop cvm

# finally call reader
{'fraction_non_alphanumeric': 0.10312004230565838, 'fraction_numerical': 0.006345848757271285, 'mean_word_length': 4.51603498542274, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '5231741', 'n_tokens_mistral': 700, 'n_tokens_neox': 670, 'n_words': 194}