<jupyter_start><jupyter_text>search with ami  define the parameters of the search<jupyter_code>import os
from os.path import expanduser
import shutil
# specific problem
VARS = {}
VARS["PROJECT"] = "funders"
VARS["E_QUERY"] = "viral epidemics"
VARS["G_HITS"] = 100
VARS["AMI_V"] = " -vv "
HOME = expanduser("~")
VARS["WORK"] = HOME + "workspace/work/search/"
VARS["AMI3"] = HOME + "workspace/cmdev/ami3/"
VARS["OPEN_VIRUS"] = HOME + "projects/openVirus/"
VARS["DICT_DIR"] = VARS["OPEN_VIRUS"] + "cambiohack2020/dictionaries/" 

# destination = shutil.copytree($IPYNB, $WORK)
# shutil.rmtree(path)<jupyter_output><empty_output><jupyter_text>create dictionaries with `amidict`<jupyter_code>! amidict -q "$EPMC" -o $PROJECT -x -k $HITS<jupyter_output><empty_output><jupyter_text>`ami search` on results of `getpapers`This requires one or more dictionaries (space-separated) in DICTIONARIESIt can transform/search 1-3 papers/sec and is quicker the second time around.<jupyter_code>! ami -$DEBUG -p $PROJECT search --dictionary $DICTIONARIES
print ("files in " + PROJECT + ":")
! ls $PROJECT<jupyter_output><empty_output><jupyter_text>[dashboard](drugs_disease_country/full.dataTables.html)<jupyter_code>## cooccurrence plots

### First, list the plots
! ls $PROJECT/__cooccurrence/
! ls $PROJECT/__cooccurrence/allPlots.svg 
# this is a kludge until we work out how to display the file
! cp $PROJECT/__cooccurrence/allPlots.svg tempAllPlots.svg<jupyter_output><empty_output><jupyter_text>display the all-vs-all plot*WARNING uses a temp file - we need to find a generic way with `display()`  all-by-all plotslicence![Alt text](https://mirrors.creativecommons.org/presskit/logos/cc.logo.svg)<jupyter_code>[(x[1],x[0]) for x in [[1,2],[3,4],[5,6]]]<jupyter_output>Object `os` not found.
{'fraction_non_alphanumeric': 0.14454443194600675, 'fraction_numerical': 0.010686164229471317, 'mean_word_length': 6.474789915966387, 'pattern_counts': {'":': 1, '<': 20, '<?xml version=': 0, '>': 20, 'https://': 1, '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}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '38903', 'license': 'Apache-2.0', 'n_tokens_mistral': 692, 'n_tokens_neox': 654, 'n_words': 146, 'path': 'src/ipynb/jupyter/.ipynb_checkpoints/amidict_create-checkpoint.ipynb', 'repo_name': 'petermr/ami3', 'size': '1778'}