<jupyter_start><jupyter_text>Saving in text files: one for sentence event scopes (X), trigger labels (y):<jupyter_code>import os
pre_path = "/Users/d22admin/USCGDrive/Spring19/ISI/EventExtraction/3Datasets/ACE/Preprocessed/"

for language in languages:
    model_results_dir = pre_path+language+"/"
    if not os.path.isdir(model_results_dir):
        os.makedirs(model_results_dir)
        
    ## Event Scopes
    with open(model_results_dir+"event_scope.txt", "wt") as fout:
        for i in range(0, len(events_list_lang[language])):
            fout.write(re.sub("\n", " ", events_list_lang[language][i].scope)+"\n")
            
    ## Triggers
    with open(model_results_dir+"event_trigger.txt", "wt") as fout:
        for i in range(0, len(events_list_lang[language])):
            fout.write(re.sub("\n", " ", events_list_lang[language][i].trigger)+"\n")
            
    ## Event Types
    with open(model_results_dir+"event_type.txt", "wt") as fout:
        for i in range(0, len(events_list_lang[language])):
            fout.write(re.sub("\n", " ", events_list_lang[language][i].type_)+"\n")
            
    ## Arguments
    """
    with open(model_results_dir+"event_argument.txt", "wt") as fout:
        for i in range(0, len(events_list_lang[language])):
            fout.write(re.sub("\n", " ", events_list_lang[language][i].trigger)+"\n")
    """<jupyter_output><empty_output><jupyter_text>Argument_type (BIO notation):<jupyter_code>events_list_lang["English"][0].scope
events_list_lang["English"][0].type_
events_list_lang["English"][0].trigger
for arg in events_list_lang["English"][0].arguments:
    print("Text:", arg.text, "Role:", arg.role)
for arg in events_list_lang["English"][0].arguments:
    print("Text:", arg.text, "Role:", arg.role)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16304952698942682, 'fraction_numerical': 0.0077907623817473565, 'mean_word_length': 4.050561797752809, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '549477', 'license': 'Apache-2.0', 'n_tokens_mistral': 625, 'n_tokens_neox': 619, 'n_words': 101, 'path': 'DataModule/Notebooks/Data Preprocessing & Statistics.ipynb', 'repo_name': 'meryemmhamdi1/multi-event-det', 'size': '1797'}