<commit_before>function stardict() {
if [[ "$1" == "-e" || "$1" == "--editor" ]]; then
    PYSCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd ../python && pwd)
    PYTHON_COMMAND="import sys; sys.path.insert(0, '"${PYSCRIPT_DIR}"')"
    VIM_COMMAND="setlocal buftype=nofile bufhidden=hide noswapfile readonly filetype=stardict"
    python -c "${PYTHON_COMMAND}; import stardict; print(stardict.getDefinition([['$2']]))" | vim -c "${VIM_COMMAND}" -
else
    for arg in "$@"; do
        $( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd ../python && pwd)/stardict.py "${arg}"
    done
fi
}<commit_msg>- Finished bash commandline implementation<commit_after>function bsdcv() {
for arg in "$@"; do
    $( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd ../python && pwd)/stardict.py "${arg}"
done
}

function vsdcv() {
PYSCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd ../python && pwd)
PYTHON_COMMAND="import sys; sys.path.insert(0, '"${PYSCRIPT_DIR}"')"
VIM_COMMAND="setlocal buftype=nofile bufhidden=hide noswapfile readonly filetype=stardict"

FINAL_DEFINITIONS=""
ARGS_LIST=""

for arg in "$@"; do
    FINAL_DEFINITIONS+="$(python -c "${PYTHON_COMMAND}; import stardict; print(stardict.getDefinition([['$arg']]))")""\n""\n"
done

echo -e "${FINAL_DEFINITIONS}"
echo -e "${FINAL_DEFINITIONS}" | vim -c "${VIM_COMMAND}" -
}
{'fraction_non_alphanumeric': 0.21964017991004497, 'fraction_numerical': 0.006746626686656672, 'mean_word_length': 5.013513513513513, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6388858', 'n_tokens_mistral': 519, 'n_tokens_neox': 497, 'n_words': 107}