Full Code of fhamborg/NewsMTSC for AI

main b9d9b79704ed cached
126 files
30.6 MB
8.0M tokens
416 symbols
1 requests
Copy disabled (too large) Download .txt
Showing preview only (32,203K chars total). Download the full file to get everything.
Repository: fhamborg/NewsMTSC
Branch: main
Commit: b9d9b79704ed
Files: 126
Total size: 30.6 MB

Directory structure:
gitextract_ate4vaz2/

├── .gitignore
├── .idea/
│   ├── .gitignore
│   ├── NewsMTSC.iml
│   ├── misc.xml
│   ├── modules.xml
│   └── vcs.xml
├── CODE_OF_CONDUCT.md
├── LICENSE
├── MANIFEST.in
├── NewsSentiment/
│   ├── .gitignore
│   ├── DatasetPreparer.py
│   ├── SentimentClasses.py
│   ├── __init__.py
│   ├── __main__.py
│   ├── combinations_default.py
│   ├── consts.py
│   ├── controller.py
│   ├── controller_data/
│   │   └── datasets/
│   │       ├── NewsMTSC-dataset/
│   │       │   ├── devtest_mt.jsonl
│   │       │   ├── devtest_rw.jsonl
│   │       │   ├── readme.md
│   │       │   └── train.jsonl
│   │       ├── acl14twitter/
│   │       │   ├── test.raw.jsonl
│   │       │   └── train.raw.jsonl
│   │       ├── newsmtsc-train-and-test-mt/
│   │       │   ├── devtest_mtsc_only.jsonl
│   │       │   └── train.jsonl
│   │       ├── newsmtsc-train-and-test-rw/
│   │       │   ├── devtest_mtsc_and_single_primaries.jsonl
│   │       │   └── train.jsonl
│   │       ├── semeval14laptops/
│   │       │   ├── Laptops_Test_Gold.xml.seg.jsonl
│   │       │   └── Laptops_Train.xml.seg.jsonl
│   │       └── semeval14restaurants/
│   │           ├── Restaurants_Test_Gold.xml.seg.jsonl
│   │           └── Restaurants_Train.xml.seg.jsonl
│   ├── converter_huggingface.py
│   ├── createoverview.py
│   ├── customexceptions.py
│   ├── dataset.py
│   ├── diskdict.py
│   ├── download.py
│   ├── earlystopping.py
│   ├── evaluator.py
│   ├── experiments/
│   │   └── default/
│   │       └── datasets/
│   │           ├── newsmtsc-mt/
│   │           │   ├── dev.jsonl
│   │           │   ├── test.jsonl
│   │           │   └── train.jsonl
│   │           ├── newsmtsc-mt-hf/
│   │           │   ├── dev.jsonl
│   │           │   ├── test.jsonl
│   │           │   └── train.jsonl
│   │           ├── newsmtsc-rw/
│   │           │   ├── dev.jsonl
│   │           │   ├── test.jsonl
│   │           │   └── train.jsonl
│   │           └── newsmtsc-rw-hf/
│   │               ├── dev.jsonl
│   │               ├── test.jsonl
│   │               └── train.jsonl
│   ├── fxlogger.py
│   ├── infer.py
│   ├── inferrest.py
│   ├── knowledge/
│   │   ├── __init__.py
│   │   ├── bingliuopinion/
│   │   │   ├── bingliuopinion.py
│   │   │   ├── converter.py
│   │   │   ├── license.txt
│   │   │   ├── negative-words.txt
│   │   │   ├── opinion_polarity.ddict
│   │   │   └── positive-words.txt
│   │   ├── knowledgeutils.py
│   │   ├── liwc/
│   │   │   ├── data/
│   │   │   │   ├── .gitignore
│   │   │   │   └── readme.txt
│   │   │   ├── dic.py
│   │   │   ├── liwc.py
│   │   │   ├── liwchelper.py
│   │   │   └── trie.py
│   │   ├── mpqasubjectivity/
│   │   │   ├── converter.py
│   │   │   ├── mpqasubjectivity.py
│   │   │   ├── subjclueslen1-HLTEMNLP05.tff
│   │   │   └── subjclueslen1-HLTEMNLP05.tff.ddict
│   │   ├── nrcemolex/
│   │   │   ├── NRC-Emotion-Lexicon-Wordlevel-v0.92.txt
│   │   │   ├── NRC-Emotion-Lexicon-Wordlevel-v0.92.txt.ddict
│   │   │   ├── converter.py
│   │   │   └── nrcemolex.py
│   │   └── zeros/
│   │       └── zerosknowledge.py
│   ├── layers/
│   │   ├── AggregatorForBert.py
│   │   ├── __init__.py
│   │   ├── attention.py
│   │   ├── dynamic_rnn.py
│   │   ├── point_wise_feed_forward.py
│   │   ├── pytorchnlpattention.py
│   │   └── squeeze_embedding.py
│   ├── losses/
│   │   ├── __init__.py
│   │   ├── crossentropycrossweight.py
│   │   ├── crossentropylosslsr.py
│   │   ├── crossentropylosswithconfidence.py
│   │   └── seq2seqloss.py
│   ├── models/
│   │   ├── FXBaseModel.py
│   │   ├── FXEnsemble.py
│   │   ├── __init__.py
│   │   ├── ensemble.py
│   │   ├── ensembleb.py
│   │   ├── multitargets/
│   │   │   ├── __init__.py
│   │   │   ├── contrasting.py
│   │   │   ├── random_multi.py
│   │   │   ├── seq2seq.py
│   │   │   ├── seq2seq_without_targetmask.py
│   │   │   ├── tdbertlikemultitarget.py
│   │   │   └── tdbertlikemultitarget_dense.py
│   │   └── singletarget/
│   │       ├── __init__.py
│   │       ├── aen.py
│   │       ├── grutscsingle.py
│   │       ├── lcf.py
│   │       ├── lcf2.py
│   │       ├── lcfs.py
│   │       ├── lcfst.py
│   │       ├── lcft.py
│   │       ├── notargetcls.py
│   │       ├── random_single.py
│   │       ├── spc.py
│   │       ├── td_bert.py
│   │       ├── td_bert_qa.py
│   │       └── tdbertlikesingle.py
│   ├── plotter_utils.py
│   ├── pretrained_models/
│   │   ├── .gitignore
│   │   └── state_dicts/
│   │       └── .gitignore
│   ├── results/
│   │   └── .gitignore
│   └── train.py
├── README.md
├── READMEpypi.md
├── hubconf.py
├── pyproject.toml
├── pythoninfo.md
└── setup.cfg

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitignore
================================================
# Created by .ignore support plugin (hsz.mobi)
### Python template
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
#  Usually these files are written by a python script from a template
#  before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
#   According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
#   However, in case of collaboration, if having platform-specific dependencies or dependencies
#   having no cross-platform support, pipenv may install dependencies that don't work, or not
#   install all needed dependencies.
#Pipfile.lock

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn.  Uncomment if using
# auto-import.
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

# OSX
#
.DS_Store


================================================
FILE: .idea/.gitignore
================================================
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/


================================================
FILE: .idea/NewsMTSC.iml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
  <component name="NewModuleRootManager" inherit-compiler-output="true">
    <exclude-output />
    <content url="file://$MODULE_DIR$">
      <excludeFolder url="file://$MODULE_DIR$/NewsSentiment.egg-info" />
      <excludeFolder url="file://$MODULE_DIR$/dist" />
    </content>
    <orderEntry type="jdk" jdkName="Python 3.7 (newsmtsc)" jdkType="Python SDK" />
    <orderEntry type="sourceFolder" forTests="false" />
  </component>
</module>

================================================
FILE: .idea/misc.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" />
  <component name="ProjectRootManager">
    <output url="file://$PROJECT_DIR$/out" />
  </component>
</project>

================================================
FILE: .idea/modules.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ProjectModuleManager">
    <modules>
      <module fileurl="file://$PROJECT_DIR$/.idea/NewsMTSC.iml" filepath="$PROJECT_DIR$/.idea/NewsMTSC.iml" />
    </modules>
  </component>
</project>

================================================
FILE: .idea/vcs.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="VcsDirectoryMappings">
    <mapping directory="" vcs="Git" />
  </component>
</project>

================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at felix.hamborg@uni-konstanz.de. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/


================================================
FILE: LICENSE
================================================
This project uses code from various projects, who may have their own license or copyright.
- ABSA-PyTorch by Yury Soong et al., available at https://github.com/songyouwei/ABSA-PyTorch
- early-stopping-pytorch by Bjarten, available at https://github.com/Bjarten/early-stopping-pytorch

For newly developed files, the license information is:

Copyright 2020 Felix Hamborg

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


================================================
FILE: MANIFEST.in
================================================
include READMEpypi.md
include pythoninfo.md


================================================
FILE: NewsSentiment/.gitignore
================================================


================================================
FILE: NewsSentiment/DatasetPreparer.py
================================================
"""
Used by controller.py to prepare datasets for an experiment, thereby most importantly considering whether the experiment
uses cross validation or not.

Currently, the class is partially hard coded for the poltsanews dataset.
"""
import math
import os
import random
from collections import Counter
from shutil import copyfile

import jsonlines
from tabulate import tabulate

from NewsSentiment.SentimentClasses import SentimentClasses
from NewsSentiment.fxlogger import get_logger


class DatasetPreparer:
    def __init__(self, name, basepath_datasets, task_format, human, non_human):
        # only used for newsmtsc format
        SentimentClasses.Sentiment3ForNewsMtsc()
        self.basepath_datasets = basepath_datasets
        self.name = name
        self.human_created_filenames = human
        self.non_human_created_filenames = non_human
        self.human_created_filepaths = [
            self.get_filepath_by_name(x) for x in self.human_created_filenames
        ]
        self.non_human_created_filepaths = [
            self.get_filepath_by_name(x) for x in self.non_human_created_filenames
        ]
        self.data_types = ["human", "nonhum"]

        self.sets_info = None

        self.random_seed = 1337
        random.seed(self.random_seed)
        self.logger = get_logger()

        self.examples_human = self.files_to_dictlst(self.human_created_filepaths)
        self.examples_nonhum = self.files_to_dictlst(self.non_human_created_filepaths)

        self.task_format = task_format

        self.logger.info(
            "shuffling example lists with seed {}".format(self.random_seed)
        )
        random.shuffle(self.examples_human)
        random.shuffle(self.examples_nonhum)

        self.logger.info(
            "{} examples read created by humans (from: {})".format(
                len(self.examples_human), self.human_created_filepaths
            )
        )
        self.logger.info(
            "{} examples read not created by humans (from: {})".format(
                len(self.examples_nonhum), self.non_human_created_filepaths
            )
        )

    def get_filepath_by_name(self, filename):
        return os.path.join(self.basepath_datasets, self.name, filename)

    def file_to_dictlst(self, filepath):
        dict_lst = []
        with jsonlines.open(filepath, "r") as reader:
            for line in reader:
                dict_lst.append(line)
        self.logger.debug("{} examples read from {}".format(len(dict_lst), filepath))
        return dict_lst

    def files_to_dictlst(self, list_filepaths):
        dict_lst = []
        for filepath in list_filepaths:
            dict_lst.extend(self.file_to_dictlst(filepath))
        return dict_lst

    def create_slices(self, data_type):
        """

        :param sets_info:
        :param data_type: 'human', 'nonhum'
        :return:
        """
        set_names = list(self.sets_info.keys())
        assert data_type in self.data_types

        # get some vars
        _id_relative_weight = "{}-rel-weight".format(data_type)
        _id_examples = "{}-examples".format(data_type)

        prev_split_pos = 0
        for set_index, set_name in enumerate(set_names):
            cur_setinfo = self.sets_info[set_name]

            if _id_relative_weight in cur_setinfo:
                cur_relative_weight = cur_setinfo[_id_relative_weight]

                if cur_relative_weight:
                    split_pos = prev_split_pos + math.floor(
                        cur_relative_weight * len(self.examples_human)
                    )
                    if set_index == len(set_names) - 1:
                        # just to be sure to not miss a single example because of rounding
                        split_pos = len(self.examples_human)

                    example_slice = self.examples_human[prev_split_pos:split_pos]
                    cur_setinfo[_id_examples] = example_slice
                    self.logger.info(
                        "{}: added {} {} examples ({:.2f})".format(
                            set_name, len(example_slice), data_type, cur_relative_weight
                        )
                    )

                    prev_split_pos = split_pos
                else:
                    cur_setinfo[_id_examples] = []

    def merge_slices(self):
        total_examples_count = 0
        for set_name, cur_set in self.sets_info.items():
            cur_merged_data = []
            for data_type in self.data_types:
                _id_examples = "{}-examples".format(data_type)

                if _id_examples in cur_set:
                    cur_merged_data.extend(cur_set[_id_examples])

            cur_set["examples"] = cur_merged_data
            total_examples_count += len(cur_merged_data)

        for set_name, cur_set in self.sets_info.items():
            cur_set["examples-rel"] = len(cur_set["examples"]) / total_examples_count

    def _get_label_counts(self, tasks):
        label_counts = Counter()
        if self.task_format == "newsmtsc":
            for task in tasks:
                assert len(task["targets"]) >= 1, f"no target in task: {task}"
                for target in task["targets"]:
                    label = SentimentClasses.polarity2label(target["polarity"])
                    label_counts[label] += 1
        elif self.task_format == "newstsc":
            for task in tasks:
                label_counts[task["label"]] += 1
        else:
            raise NotImplementedError(f"unknown data format. {self.task_format}")
        return dict(label_counts)

    def print_set_info(self):
        header = [
            "set_name",
            "human rel",
            "human abs",
            "non-hum rel",
            "non-hum abs",
            "rel",
            "abs",
            "pos",
            "neu",
            "neg",
        ]
        rows = []
        for set_name, cur_set in self.sets_info.items():
            if "file" in cur_set:
                num_lines = sum(
                    1 for line in open(self.get_filepath_by_name(cur_set["file"]), encoding="utf8")
                )
                row = [set_name, -1, -1, -1, -1, cur_set["file"], num_lines, -1, -1, -1]
            else:
                label_counts = self._get_label_counts(
                    [*(cur_set["human-examples"]), *(cur_set["nonhum-examples"])]
                )
                row = [
                    set_name,
                    cur_set["human-rel-weight"],
                    len(cur_set["human-examples"]),
                    cur_set["nonhum-rel-weight"],
                    len(cur_set["nonhum-examples"]),
                    cur_set["examples-rel"],
                    len(cur_set["examples"]),
                    label_counts["positive"],
                    label_counts["neutral"],
                    label_counts["negative"],
                ]
            rows.append(row)

        self.logger.info("\n" + tabulate(rows, header))

    def init_set(self, sets_info):
        self.sets_info = sets_info

        set_names = list(self.sets_info.keys())

        weights_human = Counter()
        weights_nonhum = Counter()
        nonnull_set_names = []
        self.filecopy_sets = {}

        # sum weights and thereby filter datasets that are 0 in size
        for set_name in set_names:
            setinfo = self.sets_info[set_name]

            if "file" in setinfo:
                self.filecopy_sets[set_name] = setinfo["file"]
            else:
                weights_human[set_name] = setinfo["human-weight"]
                weights_nonhum[set_name] = setinfo["nonhum-weight"]

                if setinfo["human-weight"] + setinfo["nonhum-weight"] > 0:
                    nonnull_set_names.append(set_name)
                else:
                    self.logger.info(
                        "discard {}, because would be empty".format(set_name)
                    )
        set_names = nonnull_set_names

        human_weight_sum = sum(weights_human.values())
        nonhuman_weight_sum = sum(weights_nonhum.values())

        # add relative weights
        for set_name in set_names:
            cur_setinfo = self.sets_info[set_name]
            if cur_setinfo["human-weight"]:
                cur_setinfo["human-rel-weight"] = (
                    cur_setinfo["human-weight"] / human_weight_sum
                )
            else:
                cur_setinfo["human-rel-weight"] = 0
            if cur_setinfo["nonhum-weight"]:
                cur_setinfo["nonhum-rel-weight"] = (
                    cur_setinfo["nonhum-weight"] / nonhuman_weight_sum
                )
            else:
                cur_setinfo["nonhum-rel-weight"] = 0
        # at this point, setsinfo contains only positive (non-0) relative weights (or no such key, if the abs. pad_value was 0, too)

        # create slices
        self.create_slices("human")
        self.create_slices("nonhum")

        # merge human and non human sets in each set
        self.merge_slices()

        self.print_set_info()

    def export(self, savepath):
        for set_name, cur_set in self.sets_info.items():
            if "file" not in cur_set:
                set_savefolder = os.path.join(savepath, self.name)
                os.makedirs(set_savefolder, exist_ok=True)
                set_savepath = os.path.join(set_savefolder, set_name + ".jsonl")

                with jsonlines.open(set_savepath, "w") as writer:
                    writer.write_all(cur_set["examples"])
                self.logger.debug(
                    "created set (abs={}) at {}".format(
                        len(cur_set["examples"]), set_savepath
                    )
                )

        for set_name, filename in self.filecopy_sets.items():
            set_savefolder = os.path.join(savepath, self.name)
            os.makedirs(set_savefolder, exist_ok=True)
            set_savepath = os.path.join(set_savefolder, set_name + ".jsonl")
            set_sourcepath = self.get_filepath_by_name(filename)

            copyfile(set_sourcepath, set_savepath)
            self.logger.debug("copied set to {}".format(set_savepath))

    @classmethod
    def poltsanews_rel801010_allhuman(cls, basepath):
        name = "poltsanews"
        task_format = "newstsc_old"
        human_created_filenames = ["human.jsonl"]
        non_human_created_filenames = ["train_20191021_233454.jsonl"]

        dprep = cls(
            name,
            basepath,
            task_format,
            human_created_filenames,
            non_human_created_filenames,
        )

        sets_info = {
            "train": {"human-weight": 80, "nonhum-weight": 0},
            "dev": {"human-weight": 10, "nonhum-weight": 0},
            "test": {"human-weight": 10, "nonhum-weight": 0},
        }

        dprep.init_set(sets_info)
        return dprep, name, task_format

    @classmethod
    def poltsanews_crossval8010_allhuman(cls, basepath):
        name = "poltsanews"
        task_format = "newstsc_old"
        human_created_filenames = ["human.jsonl"]
        non_human_created_filenames = ["train_20191021_233454.jsonl"]

        dprep = cls(
            name,
            basepath,
            task_format,
            human_created_filenames,
            non_human_created_filenames,
        )

        sets_info = {
            "crossval": {"human-weight": 80, "nonhum-weight": 0},
            "test": {"human-weight": 10, "nonhum-weight": 0},
        }

        dprep.init_set(sets_info)
        return dprep, name, task_format

    @classmethod
    def acl14twitter(cls, basepath):
        name = "acl14twitter"
        task_format = "newsmtsc"
        human_created_filenames = ["train.raw.jsonl"]
        non_human_created_filenames = []

        dprep = cls(
            name,
            basepath,
            task_format,
            human_created_filenames,
            non_human_created_filenames,
        )

        sets_info = {
            "train": {"human-weight": 80, "nonhum-weight": 0},
            "dev": {"human-weight": 10, "nonhum-weight": 0},
            "test": {"file": "test.raw.jsonl"},
        }

        dprep.init_set(sets_info)
        return dprep, name, task_format

    @classmethod
    def semeval14laptops(cls, basepath):
        name = "semeval14laptops"
        task_format = "newsmtsc"
        human_created_filenames = ["Laptops_Train.xml.seg.jsonl"]
        non_human_created_filenames = []

        dprep = cls(
            name,
            basepath,
            task_format,
            human_created_filenames,
            non_human_created_filenames,
        )

        sets_info = {
            "train": {"human-weight": 80, "nonhum-weight": 0},
            "dev": {"human-weight": 10, "nonhum-weight": 0},
            "test": {"file": "Laptops_Test_Gold.xml.seg.jsonl"},
        }

        dprep.init_set(sets_info)
        return dprep, name, task_format

    @classmethod
    def semeval14restaurants(cls, basepath):
        name = "semeval14restaurants"
        task_format = "newsmtsc"
        human_created_filenames = ["Restaurants_Train.xml.seg.jsonl"]
        non_human_created_filenames = []

        dprep = cls(
            name,
            basepath,
            task_format,
            human_created_filenames,
            non_human_created_filenames,
        )

        sets_info = {
            "train": {"human-weight": 80, "nonhum-weight": 0},
            "dev": {"human-weight": 10, "nonhum-weight": 0},
            "test": {"file": "Restaurants_Test_Gold.xml.seg.jsonl"},
        }

        dprep.init_set(sets_info)
        return dprep, name, task_format

    @classmethod
    def newsmtsc_devtest_mt(cls, basepath):
        name = "newsmtsc-train-and-test-mt"
        task_format = "newsmtsc"
        human_created_filenames = ["devtest_mtsc_only.jsonl"]
        non_human_created_filenames = []
        dprep = cls(
            name,
            basepath,
            task_format,
            human_created_filenames,
            non_human_created_filenames,
        )

        sets_info = {
            "train": {"file": "train.jsonl"},
            "dev": {"human-weight": 30, "nonhum-weight": 0},
            "test": {"human-weight": 70, "nonhum-weight": 0},
        }

        dprep.init_set(sets_info)
        return dprep, name, task_format

    @classmethod
    def newsmtsc_devtest_rw(cls, basepath):
        name = "newsmtsc-train-and-test-rw"
        task_format = "newsmtsc"
        human_created_filenames = ["devtest_mtsc_and_single_primaries.jsonl"]
        non_human_created_filenames = []
        dprep = cls(
            name,
            basepath,
            task_format,
            human_created_filenames,
            non_human_created_filenames,
        )

        sets_info = {
            "train": {"file": "train.jsonl"},
            "dev": {"human-weight": 30, "nonhum-weight": 0},
            "test": {"human-weight": 70, "nonhum-weight": 0},
        }

        dprep.init_set(sets_info)
        return dprep, name, task_format


if __name__ == "__main__":
    DatasetPreparer.sentinews("controller_data/datasets")


================================================
FILE: NewsSentiment/SentimentClasses.py
================================================
from typing import Iterable


class SentimentClasses:
    FILLUP_POLARITY_VALUE = -100
    FILLUP_POLARITY_LABEL = "fillup"
    SENTIMENT_CLASSES = None

    @staticmethod
    def initialize(sentiment_classes: dict):
        SentimentClasses.SENTIMENT_CLASSES = sentiment_classes

    @staticmethod
    def get_num_classes():
        return len(SentimentClasses.SENTIMENT_CLASSES)

    @staticmethod
    def __evaluate_boundary(given_value: float, boundary: tuple):
        operator = boundary[0]
        value = boundary[1]
        if operator == "<=":
            return given_value <= value
        elif operator == "<":
            return given_value < value
        elif operator == ">=":
            return given_value >= value
        elif operator == ">":
            return given_value > value
        elif operator == "==":
            return given_value == value
        else:
            raise ValueError

    @staticmethod
    def __evaluate_boundaries_of_class(
        given_value: float, sentiment_boundaries: Iterable[tuple]
    ):
        assert len(sentiment_boundaries) >= 1
        for boundary in sentiment_boundaries:
            is_valid = SentimentClasses.__evaluate_boundary(given_value, boundary)
            if not is_valid:
                return False
        return True

    @staticmethod
    def __get_legacy_information():
        # self.polarity_associations = {"positive": 2, "neutral": 1, "negative": 0}
        # self.polarity_associations_inv = {2: "positive", 1: "neutral", 0: "negative"}
        # self.sorted_expected_label_values = [0, 1, 2]
        # self.sorted_expected_label_names = ["negative", "neutral", "positive"]

        sentiment_labels = list(SentimentClasses.SENTIMENT_CLASSES.keys())
        sentiment_normalized_values = []
        for label in sentiment_labels:
            sentiment_normalized_values.append(
                SentimentClasses.SENTIMENT_CLASSES[label]["normalized_polarity"]
            )

        polarity_associations = {}
        polarity_associations_inv = {}
        for label, value in zip(sentiment_labels, sentiment_normalized_values):
            polarity_associations[label] = value
            polarity_associations_inv[value] = label

        return {
            "polarity_associations": polarity_associations,
            "polarity_associations_inv": polarity_associations_inv,
            "sorted_expected_label_values": sentiment_normalized_values,
            "sorted_expected_label_names": sentiment_labels,
        }

    @staticmethod
    def get_sorted_expected_label_names():
        return SentimentClasses.__get_legacy_information()[
            "sorted_expected_label_names"
        ]

    @staticmethod
    def get_sorted_expected_label_values():
        return SentimentClasses.__get_legacy_information()[
            "sorted_expected_label_values"
        ]

    @staticmethod
    def get_polarity_associations():
        return SentimentClasses.__get_legacy_information()["polarity_associations"]

    @staticmethod
    def get_polarity_associations_inverse():
        return SentimentClasses.__get_legacy_information()["polarity_associations_inv"]

    @staticmethod
    def __find_sentiment_class(polarity: float):
        resulting_class = None
        for sentiment_label, info in SentimentClasses.SENTIMENT_CLASSES.items():
            sentiment_boundaries = info["boundaries"]
            sentiment_normalized_polarity = info["normalized_polarity"]
            is_in_class_boundaries = SentimentClasses.__evaluate_boundaries_of_class(
                polarity, sentiment_boundaries
            )
            if is_in_class_boundaries:
                # check polarity is not in another class, too
                assert (
                    resulting_class is None
                ), f"overlapping sentiment classes; previous class: {resulting_class}"
                resulting_class = (sentiment_label, sentiment_normalized_polarity)

        # check that a class was found
        assert resulting_class, f"result is not defined for polarity: {polarity}"

        return resulting_class

    @staticmethod
    def polarity2label(polarity: float) -> str:
        if polarity == SentimentClasses.FILLUP_POLARITY_VALUE:
            return SentimentClasses.FILLUP_POLARITY_LABEL

        sentiment_class = SentimentClasses.__find_sentiment_class(polarity)
        label = sentiment_class[0]
        return label

    @staticmethod
    def polarity2normalized_polarity(polarity: float) -> int:
        if polarity == SentimentClasses.FILLUP_POLARITY_VALUE:
            return int(SentimentClasses.FILLUP_POLARITY_VALUE)

        sentiment_class = SentimentClasses.__find_sentiment_class(polarity)
        normalized_polarity = sentiment_class[1]
        return normalized_polarity

    @staticmethod
    def Sentiment3ForNewsMtsc():
        sentiment_classes = {
            "positive": {
                "boundaries": [(">=", 5), ("<=", 7)],
                "normalized_polarity": 2,
            },
            "neutral": {"boundaries": [(">", 3), ("<", 5)], "normalized_polarity": 1},
            "negative": {
                "boundaries": [(">=", 1), ("<=", 3)],
                "normalized_polarity": 0,
            },
        }
        SentimentClasses.initialize(sentiment_classes)

    @staticmethod
    def SentimentStrong3ForNewsMtsc():
        sentiment_classes = {
            "positive": {
                "boundaries": [(">=", 6), ("<=", 7)],
                "normalized_polarity": 2,
            },
            "neutral": {"boundaries": [(">", 2), ("<", 6)], "normalized_polarity": 1},
            "negative": {
                "boundaries": [(">=", 1), ("<=", 2)],
                "normalized_polarity": 0,
            },
        }
        SentimentClasses.initialize(sentiment_classes)

    @staticmethod
    def SentimentWeak3ForNewsMtsc():
        sentiment_classes = {
            "positive": {
                "boundaries": [(">=", 4.5), ("<=", 7)],
                "normalized_polarity": 2,
            },
            "neutral": {
                "boundaries": [(">", 3.5), ("<", 4.5)],
                "normalized_polarity": 1,
            },
            "negative": {
                "boundaries": [(">=", 1), ("<=", 3.5)],
                "normalized_polarity": 0,
            },
        }
        SentimentClasses.initialize(sentiment_classes)


================================================
FILE: NewsSentiment/__init__.py
================================================
from NewsSentiment.infer import TargetSentimentClassifier


================================================
FILE: NewsSentiment/__main__.py
================================================
import argparse

from NewsSentiment.download import Download

if __name__ == '__main__':
    parser = argparse.ArgumentParser(prog='NewsSentiment')
    subparsers = parser.add_subparsers(dest='action')

    subparser_download = subparsers.add_parser('download', help=Download.add_subparser.__doc__)
    Download.add_subparser(subparser_download)

    args = parser.parse_args()
    action = args.action
    del args.action

    if action == 'download':
        Download.run_from_parser(args)


================================================
FILE: NewsSentiment/combinations_default.py
================================================
from NewsSentiment.consts import BERT_BASE_UNCASED

combinations_default_0 = {
    "own_model_name": [
        # baselines: single
        "notargetclsbert",
        "lcf_bert",
        "lcf_bert2",
        "lcfs_bert",
        "lcft_bert",
        "aen_bert",
        "spc_bert",
        "tdbert",
        "tdbert-qa-mul",
        "tdbert-qa-con",
        # own models: single
        "tdbertlikesingle",
        "lcfst_bert",
        "grutsc",
        # own models: multi
        "tdbertlikemulti",
        # "tdbertlikemulti_dense",
        "seq2seq",
        "seq2seq_withouttargetmask",
        "contrasting",
        # baselines
        # "random_single",
        # "random_multi",
    ],
    "optimizer": ["adam"],
    "initializer": ["xavier_uniform_"],
    "learning_rate": ["2e-5", "3e-5", "5e-5"],
    "batch_size": [
        "16",
        # "32",
    ],  # ['16', '32'],
    "balancing": ["None"],  # ['None', 'lossweighting', 'oversampling'],
    "devmode": ["False"],
    "num_epoch": ["2", "3", "4"],
    "loss": [
        "crossentropy",
        "crossentropy_lsr",
        "sequence",
        "crossentropy_crossweight",
    ],
    # "spc_lm_representation_distilbert": ["mean_last"],
    # ['sum_last', 'sum_last_four', 'sum_last_two', 'sum_all', 'mean_last', 'mean_last_four', 'mean_last_two', 'mean_all'],
    # "spc_lm_representation": ["pooler_output"],
    # ['pooler_output', 'sum_last', 'sum_last_four', 'sum_last_two', 'sum_all', 'mean_last', 'mean_last_four', 'mean_last_two', 'mean_all'],
    # "spc_input_order": ["text_target"],  # 'target_text',
    # "aen_lm_representation": ["last"],
    # ['last', 'sum_last_four', 'sum_last_two', 'sum_all', 'mean_last_four'],  # 'mean_last_two', 'mean_all'],
    "eval_only_after_last_epoch": ["True"],
    "local_context_focus": ["cdm", "cdw"],
    "SRD": ["3", "4", "5"],
    "pretrained_model_name": ["default"],
    # ['default', 'bert_news_ccnc_10mio_3ep', 'laptops_and_restaurants_2mio_ep15', 'laptops_1mio_ep30', 'restaurants_10mio_ep3'],
    "state_dict": ["None"],
    # ['None', 'lcf_bert_acl14twitter_val_recall_avg_0.7349_epoch3', 'lcf_bert_semeval14laptops_val_recall_avg_0.7853_epoch3', 'lcf_bert_semeval14restaurants_val_recall_avg_0.7672_epoch2', 'lcf_bert_newstsc_val_recall_avg_0.5954_epoch3'],
    "single_targets": [
        "True"
    ],  # using conditions in controller.py, we have single_targets only for single target models
    "multi_targets": [
        "True"
    ],  # using conditions in controller.py, we have multi_targets only for multi target models
    "targetclasses": [
        "newsmtsc3",
        #"newsmtsc3strong",
        #"newsmtsc3weak",
    ],
    "knowledgesources": [
        "nrc_emotions", "mpqa_subjectivity", "bingliu_opinion", "liwc",
        "nrc_emotions mpqa_subjectivity", "nrc_emotions liwc",
        "nrc_emotions bingliu_opinion", "mpqa_subjectivity bingliu_opinion",
        "mpqa_subjectivity liwc", "bingliu_opinion liwc",
        "nrc_emotions mpqa_subjectivity bingliu_opinion",
        "nrc_emotions mpqa_subjectivity liwc",
        "nrc_emotions liwc bingliu_opinion",
        "liwc mpqa_subjectivity bingliu_opinion",
        "nrc_emotions mpqa_subjectivity bingliu_opinion liwc",
        "zeros",
    ],
    "is_use_natural_target_phrase_for_spc": [
        "True",
        "False"
    ],
    "default_lm": [
        BERT_BASE_UNCASED,
    ],
    "coref_mode_in_training": [
        "ignore",
        "in_targetmask",
        "additional_examples"
    ],
}


================================================
FILE: NewsSentiment/consts.py
================================================
BERT_BASE_UNCASED = "bert-base-uncased"
ROBERTA_BASE = "roberta-base"
XLNET_BASE_CASED = "xlnet-base-cased"
ALBERT_BASE = "albert-base-v2"
ALBERT_LARGE = "albert-large-v2"
ALBERT_XLARGE = "albert-xlarge-v2"
ALBERT_XXLARGE = "albert-xxlarge-v2"
__DEFAULT_LM = None


def set_default_lm(new_name: str):
    global __DEFAULT_LM
    __DEFAULT_LM = new_name


def get_default_lm():
    return __DEFAULT_LM


FIELD_TEXT_IDS_WITH_SPECIAL_TOKENS = "text_ids_with_special_tokens"
FIELD_TEXT_IDS_WITH_SPECIAL_TOKENS_TARGET_MASK = (
    FIELD_TEXT_IDS_WITH_SPECIAL_TOKENS + "_target_mask"
)
FIELD_TEXT_IDS_WITH_SPECIAL_TOKENS_SELECTED_KNOWLEDGE_SOURCES = (
    FIELD_TEXT_IDS_WITH_SPECIAL_TOKENS + "_selectedknowledgesources"
)
FIELD_IS_OVERFLOW = "is_overflow"
FIELD_TEXT_THEN_TARGET_IDS_WITH_SPECIAL_TOKENS = (
    "text_then_target_ids_with_special_tokens"
)
# we used to have text-then-target target mask here, but won't use it,
# since it would be identical to the text target mask (since we only
# want to mark the target within the text, but not in the 2nd target
# component)
# FIELD_TEXT_THEN_TARGET_IDS_WITH_SPECIAL_TOKENS_TARGET_MASK = (
#    FIELD_TEXT_THEN_TARGET_IDS_WITH_SPECIAL_TOKENS + "_target_mask"
# )
# same for knowledge sources
# FIELD_TEXT_THEN_TARGET_IDS_WITH_SPECIAL_TOKENS_KNOWLEDGE_SOURCES = (
#         FIELD_TEXT_THEN_TARGET_IDS_WITH_SPECIAL_TOKENS + "_selectedknowledgesources"
# )
FIELD_TEXT_THEN_TARGET_IDS_WITH_SPECIAL_TOKENS_SEGMENT_IDS = (
    FIELD_TEXT_THEN_TARGET_IDS_WITH_SPECIAL_TOKENS + "_segment_ids"
)
FIELD_TARGET_IDS_WITH_SPECIAL_TOKENS = "target_ids_with_special_tokens"
FIELD_SYNTAX_HOP_DISTANCE_TO_TARGET = "syntax_hop_distance_to_target"
FIELD_SYNTAX_DEPENDENCY_MATRIX = "syntax_dependency_matrix"


================================================
FILE: NewsSentiment/controller.py
================================================
"""
Definitions:
setup: represents a fixed, unique combination of for instance:
* model, e.g., BERT, DISTILBERT
* hyper-parameters, such as learning rate loss function, weights of classes for loss function
* others, such as softmax,
* input style, e.g., input style: QA style, AEN, ...

Procedure:
Given a single annotated dataset named alldat (also called both.jsonl, since it consists of both splits of the devtest
set):
* splits alldat into testdat and remainderdat

Given a set of experiment setup descriptions
1) Iterate setup descriptions, for each:
a) create 10-fold CV to well evaluate the performance of that particular setup
b) return model from best epoch (or from best fold???!?)
2) retrievel all best performing models and test them on testdat
3) return model that performs best on testdat
"""
from threading import Lock
import argparse
import multiprocessing
import os
import subprocess
import time
from collections import Counter, defaultdict
from datetime import datetime
from itertools import product

from jsonlines import jsonlines
from tabulate import tabulate
from tqdm import tqdm

from NewsSentiment.combinations_ensemble import combinations_ensemble
from NewsSentiment.combinations_final_lcf2 import combinations_final_lcf2
from NewsSentiment.combinations_final_nostance import combinations_final_nostance
from NewsSentiment.combinations_final_spc import combinations_final_spc
from NewsSentiment.combinations_final_stance0 import combinations_final_stance0
from NewsSentiment.combinations_final_stance1 import combinations_final_stance1
from NewsSentiment.combinations_final_tdbert import combinations_final_tdbert
from NewsSentiment.combinations_top import combinations_top
from NewsSentiment.DatasetPreparer import DatasetPreparer
from NewsSentiment.combinations_default import combinations_default_0
from NewsSentiment.combinations_top4otherdomains import combinations_top4otherdomains
from NewsSentiment.combinations_top_coref16 import combinations_top_coref16
from NewsSentiment.combinations_top_coref8 import combinations_top_coref8
from NewsSentiment.combinations_top_coref8_stanceno import combinations_top_coref8_stanceno
from NewsSentiment.combinations_top_finetuned import combinations_top_finetuned
from NewsSentiment.diskdict import DiskDict
from NewsSentiment.fxlogger import get_logger
from NewsSentiment.train import str2bool

completed_tasks = None  # will be DiskDict later
completed_tasks_in_this_run_count = 0
lock = Lock()


def start_worker(
    experiment_id,
    experiment_named_id,
    named_combination,
    cmd,
    human_cmd,
    experiment_path,
    running_processes,
):
    if "--device" in cmd:
        device_index_in_list = cmd.index("--device")
        device = cmd[device_index_in_list + 1]
    else:
        device = -1

    running_processes[experiment_id] = (True, device)
    logger = get_logger()

    logger.debug("starting single setup: {}".format(human_cmd))
    with open(os.path.join(experiment_path, "stdlog.out"), "w") as file_stdout, open(
        os.path.join(experiment_path, "stdlog.err"), "w"
    ) as file_stderr:
        completed_process = subprocess.run(cmd, stdout=file_stdout, stderr=file_stderr)

    experiment_details = get_experiment_result_detailed(experiment_path)

    running_processes[experiment_id] = (False, device)
    return {
        **named_combination,
        **{"rc": completed_process.returncode, "experiment_id": experiment_id},
        "details": experiment_details,
        "experiment_named_id": experiment_named_id,
    }


def on_task_done(x):
    with lock:
        # result_list is modified only by the main process, not the pool workers.
        completed_tasks[x["experiment_named_id"]] = x
        completed_tasks.sync_to_disk()
        global completed_tasks_in_this_run_count
        completed_tasks_in_this_run_count += 1


def on_task_error(x):
    with lock:
        # result_list is modified only by the main process, not the pool workers.
        completed_tasks[x["experiment_named_id"]] = x
        completed_tasks.sync_to_disk()
        global completed_tasks_in_this_run_count
        completed_tasks_in_this_run_count += 1


def get_experiment_result_detailed(experiment_path):
    experiment_results_path = os.path.join(experiment_path, "experiment_results.jsonl")
    try:
        with jsonlines.open(experiment_results_path, "r") as reader:
            lines = []
            for line in reader:
                lines.append(line)
            assert len(lines) == 1
        return lines[0]
    except FileNotFoundError:
        return None


class SetupController:
    def __init__(self, options):
        self.logger = get_logger()
        self.opt = options

        if self.opt.cuda_devices:
            # to run on SCC
            if self.opt.cuda_devices == "SGE_GPU":
                self.cuda_devices = os.environ.get("SGE_GPU")
            else:
                self.cuda_devices = self.opt.cuda_devices

            if self.cuda_devices:
                self.logger.info("cuda devices:" + self.cuda_devices)
                self.cuda_devices = self.cuda_devices.split(",")
                self.logger.info(
                    f"was assigned {len(self.cuda_devices)} cuda devices: "
                    f"{self.cuda_devices}"
                )
                if self.opt.num_workers < 0:
                    self.logger.info(
                        f"num_workers < 0: using cuda device count. setting "
                        f"num_workers={len(self.cuda_devices)}"
                    )
                    self.opt.num_workers = len(self.cuda_devices)

        else:
            # do not use CUDA
            self.cuda_devices = None

        self.snem = "f1_macro"
        self.experiment_base_path = self.opt.experiments_path

        args_names_ordered = [
            "own_model_name",
            "optimizer",
            "initializer",
            "learning_rate",
            "batch_size",
            "balancing",
            "num_epoch",
            "loss",
            "eval_only_after_last_epoch",
            "devmode",
            "local_context_focus",
            "SRD",
            "pretrained_model_name",
            "state_dict",
            "single_targets",
            "multi_targets",
            "targetclasses",
            "knowledgesources",
            "is_use_natural_target_phrase_for_spc",
            "default_lm",
            "coref_mode_in_training",
        ]

        combinations = None
        if self.opt.combi_mode == "default":
            combinations = combinations_default_0
        elif self.opt.combi_mode == "top":
            combinations = combinations_top
        elif self.opt.combi_mode == "top_coref8":
            combinations = combinations_top_coref8
        elif self.opt.combi_mode == "top_coref8_stanceno":
            combinations = combinations_top_coref8_stanceno
        elif self.opt.combi_mode == "top_coref16":
            combinations = combinations_top_coref16
        elif self.opt.combi_mode == "top_finetuned":
            combinations = combinations_top_finetuned
        elif self.opt.combi_mode == "top4otherdomains":
            combinations = combinations_top4otherdomains
        elif self.opt.combi_mode == "ensemble":
            combinations = combinations_ensemble
        elif self.opt.combi_mode == "final_stance0":
            combinations = combinations_final_stance0
        elif self.opt.combi_mode == "final_stance1":
            combinations = combinations_final_stance1
        elif self.opt.combi_mode == "final_nostance":
            combinations = combinations_final_nostance
        elif self.opt.combi_mode == "final_tdbert":
            combinations = combinations_final_tdbert
        elif self.opt.combi_mode == "final_lcf2":
            combinations = combinations_final_lcf2
        elif self.opt.combi_mode == "final_spc":
            combinations = combinations_final_spc

        if not combinations:
            raise ValueError(
                "combination(mode={}, id={}) not defined".format(
                    self.opt.combi_mode, self.opt.combi_id
                )
            )

        # key: name of parameter that is only applied if its conditions are met
        # pad_value: list of tuples, consisting of parameter name and the pad_value it needs to have in order for the
        # condition to be satisfied
        # Note that all tuples in this list are OR connected, so if at least one is satisfied, the conditions are met.
        # If we need AND connected conditions, my idea is to add an outer list, resulting in a list of lists (of
        # tuples) where all lists are AND connected.
        # If a condition is not satisfied, the corresponding parameter will still be pass
        # if a key is not listed here, there are no conditions and thus the key / parameter will be used always
        conditions = {
            "is_use_natural_target_phrase_for_spc": [("own_model_name", "spc_bert")],
            "spc_lm_representation": [("own_model_name", "spc_bert"),],
            "spc_input_order": [("own_model_name", "spc_bert"),],
            "aen_lm_representation": [("own_model_name", "aen_bert"),],
            "use_early_stopping": [("num_epoch", "10"),],
            "local_context_focus": [
                ("own_model_name", "lcf_bert"),
                ("own_model_name", "lcf_bert2"),
                ("own_model_name", "lcfs_bert"),
                ("own_model_name", "lcfst_bert"),
            ],
            "SRD": [
                ("own_model_name", "lcf_bert"),
                ("own_model_name", "lcf_bert2"),
                ("own_model_name", "lcfs_bert"),
                ("own_model_name", "lcfst_bert"),
            ],
            "single_targets": [
                # we need single_targets mode only for models that are single target
                ("own_model_name", "lcf_bert"),
                ("own_model_name", "lcf_bert2"),
                ("own_model_name", "lcfs_bert"),
                ("own_model_name", "lcft_bert"),
                ("own_model_name", "lcfst_bert"),
                ("own_model_name", "aen_bert"),
                ("own_model_name", "spc_bert"),
                ("own_model_name", "tdbert"),
                ("own_model_name", "EnsembleTopA"),
                ("own_model_name", "EnsembleTopB"),
                ("own_model_name", "tdbert-qa-mul"),
                ("own_model_name", "tdbert-qa-con"),
                ("own_model_name", "tdbertlikesingle"),
                ("own_model_name", "notargetclsbert"),
                ("own_model_name", "random_single"),
                ("own_model_name", "grutsc"),
            ],
            "multi_targets": [
                ("own_model_name", "tdbertlikemulti"),
                ("own_model_name", "tdbertlikemulti_dense"),
                ("own_model_name", "seq2seq"),
                ("own_model_name", "seq2seq_withouttargetmask"),
                ("own_model_name", "random_multi"),
                ("own_model_name", "contrasting"),
            ],
            "knowledgesources": [
                ("own_model_name", "EnsembleTopA"),
                ("own_model_name", "EnsembleTopB"),
                ("own_model_name", "grutsc"),
            ],
            "pretrained_model_name": [("default_lm", "bert-base-uncased"),],
        }

        assert set(args_names_ordered) == set(combinations.keys()), (
            f"mismatch args_names_ordered vs. combinations: "
            f"{set(args_names_ordered).symmetric_difference(combinations)}"
        )

        self.experiment_base_id = (
            self.opt.dataset + "_" + datetime.today().strftime("%Y%m%d-%H%M%S")
        )
        self.basecmd = ["python", "train.py"]
        self.basepath = "controller_data"
        self.basepath_data = os.path.join(self.basepath, "datasets")

        combination_count = 1
        _combination_values = []
        for arg_name in args_names_ordered:
            arg_values = list(combinations[arg_name])
            combination_count = combination_count * len(arg_values)
            _combination_values.append(arg_values)

        combinations = list(product(*_combination_values))
        assert len(combinations) == combination_count

        self.logger.info(
            "{} arguments, totaling in {} combinations".format(
                len(args_names_ordered), combination_count
            )
        )

        # apply conditions
        self.logger.info("applying conditions...")
        self.named_combinations, count_duplicates = self._apply_conditions(
            combinations, args_names_ordered, conditions
        )
        self.logger.info(
            "applied conditions. removed {} combinations. {} -> {}".format(
                count_duplicates, combination_count, len(self.named_combinations)
            )
        )
        self.combination_count = len(self.named_combinations)

        # expand by number of runs per experiment
        expanded_named_combinations = []
        for named_combination in self.named_combinations:
            for run_id in range(self.opt.num_runs_per_experiment):
                expanded_named_combination = named_combination.copy()
                expanded_named_combination["run_id"] = run_id
                expanded_named_combinations.append(expanded_named_combination)
        self.logger.info(
            "expanded to %s runs per experiment. combination count: %s -> %s",
            self.opt.num_runs_per_experiment,
            self.combination_count,
            len(expanded_named_combinations),
        )
        self.named_combinations = expanded_named_combinations
        self.combination_count = len(self.named_combinations)

        if self.opt.dataset == "semeval14restaurants":
            (
                self.dataset_preparer,
                self.datasetname,
                self.task_format,
            ) = DatasetPreparer.semeval14restaurants(self.basepath_data)
        elif self.opt.dataset == "semeval14laptops":
            (
                self.dataset_preparer,
                self.datasetname,
                self.task_format,
            ) = DatasetPreparer.semeval14laptops(self.basepath_data)
        elif self.opt.dataset == "acl14twitter":
            (
                self.dataset_preparer,
                self.datasetname,
                self.task_format,
            ) = DatasetPreparer.acl14twitter(self.basepath_data)
        elif (
            self.opt.dataset
            == "newsmtsc_devtest_rw"
        ):
            (
                self.dataset_preparer,
                self.datasetname,
                self.task_format,
            ) = DatasetPreparer.newsmtsc_devtest_rw(
                self.basepath_data
            )
        elif (
                self.opt.dataset
                == "newsmtsc_devtest_mt"
        ):
            (
                self.dataset_preparer,
                self.datasetname,
                self.task_format,
            ) = DatasetPreparer.newsmtsc_devtest_mt(
                self.basepath_data
            )
        else:
            raise Exception("unknown dataset: {}".format(self.opt.dataset))

    def _apply_conditions(self, combinations, args_names_ordered, conditions):
        named_combinations = []
        seen_experiment_ids = set()
        count_duplicates = 0

        with tqdm(total=len(combinations)) as pbar:
            for combination in combinations:
                named_combination = {}
                full_named_combination = self._args_combination_to_single_arg_values(
                    combination, args_names_ordered
                )

                # for a parameter combination, pass only those parameters that are valid
                # for that combination
                for arg_index, arg_name in enumerate(args_names_ordered):
                    # iterate each parameter and validate - using the other parameter
                    # names and values - whether its conditions are met
                    if self._check_conditions(
                        arg_name, full_named_combination, conditions
                    ):
                        # if yes, pass it
                        named_combination[arg_name] = combination[arg_index]
                        self.logger.debug(
                            "using '{}' in combination {}".format(arg_name, combination)
                        )
                    else:
                        self.logger.debug(
                            "not using '{}' in combination {}".format(
                                arg_name, combination
                            )
                        )

                # check if experiment_id of named combination was already seen
                experiment_id = self._experiment_named_id_from_named_combination(
                    named_combination
                )
                if experiment_id not in seen_experiment_ids:
                    seen_experiment_ids.add(experiment_id)
                    named_combinations.append(named_combination)
                else:
                    count_duplicates += 1

                pbar.update(1)

        return named_combinations, count_duplicates

    def _check_conditions(self, arg_name, full_named_combination, conditions):
        """
        For a given parameter, checks whether its conditions are satisfied. If so, returns True, else False.
        :param arg_name:
        :param arg_value:
        :return:
        """
        if arg_name in conditions and len(conditions[arg_name]) >= 1:
            # at this point we know that there are conditions for the given parameters
            or_connected_conditions = conditions[arg_name]

            for cond_tup in or_connected_conditions:
                cond_param_name = cond_tup[0]
                cond_param_value = cond_tup[1]

                # get parameter and its pad_value in current combination
                if full_named_combination[cond_param_name] == cond_param_value:
                    return True

            # since there was at least one condition due to our check above, we return
            # False here, since the for loop did not return True
            return False

        else:
            # if there is no condition associated with arg_name just return true
            return True

    def _build_args(self, named_args):
        args_list = []
        for arg_name, arg_val in named_args.items():
            self._add_arg(args_list, arg_name, arg_val)

        return args_list

    def _add_arg(self, args_list, name, value):
        args_list.append("--" + name)
        args_list.append(str(value))
        return args_list

    def _prepare_experiment_env(self, experiment_path):
        os.makedirs(experiment_path, exist_ok=True)
        self.dataset_preparer.export(os.path.join(experiment_path, "datasets"))

    def _args_combination_to_single_arg_values(
        self, args_combination, args_names_ordered
    ):
        args_names_values = {}
        for arg_index, arg_name in enumerate(args_names_ordered):
            args_names_values[arg_name] = args_combination[arg_index]
        return args_names_values

    def _experiment_named_id_from_named_combination(self, named_combination):
        return "__".join(["{}={}".format(k, v) for (k, v) in named_combination.items()])

    def prepare_single_setup(self, named_combination, experiment_id, pool_index):
        experiment_path = "{}/{}/".format(self.experiment_base_id, experiment_id)
        experiment_path = os.path.join(self.experiment_base_path, experiment_path)

        self._prepare_experiment_env(experiment_path)

        args = self._build_args(named_combination)
        self._add_arg(args, "snem", self.snem)
        self._add_arg(args, "dataset_name", self.datasetname)
        self._add_arg(args, "experiment_path", experiment_path)
        self._add_arg(args, "data_format", self.task_format)

        if self.cuda_devices:
            # we use the pool_index to get the respective pool's cuda device
            cuda_device_id = self.cuda_devices[pool_index]
            cuda_device_name = "cuda:" + str(cuda_device_id)
            self._add_arg(args, "device", cuda_device_name)

        cmd = self.basecmd + args
        human_cmd = " ".join(cmd)

        with open(os.path.join(experiment_path, "experiment_cmd.sh"), "w") as writer:
            writer.write(human_cmd)

        return cmd, human_cmd, experiment_path

    def run(self):
        global completed_tasks

        if not self.opt.results_path:
            results_path = "results/default_results_{}".format(self.datasetname)
        else:
            results_path = self.opt.results_path

        if not self.opt.continue_run:
            self.logger.info("not continuing")
            os.remove(results_path)
        else:
            self.logger.info("continuing previous run(s)")

        completed_tasks = DiskDict(results_path)
        self.logger.info("found {} previous results".format(len(completed_tasks)))

        self.logger.info("preparing experiment setups...")
        experiment_descs = defaultdict(list)
        previous_tasks = Counter()
        with tqdm(total=self.combination_count) as pbar:
            for i, named_combination in enumerate(self.named_combinations):
                _experiment_named_id = self._experiment_named_id_from_named_combination(
                    named_combination
                )
                # i modulo the number of workers determines which pool this experiment
                # will run in. the pool_index will also later be used to determine
                # which cuda device (if any) to use, thereby making sure, that all tasks
                # of one pool use the same device, whereas each device will be used
                # solely by only one pool (this way, we make sure that at no time two
                # or more tasks will run that use the same cuda device)
                pool_index = i % self.opt.num_workers

                if _experiment_named_id in completed_tasks:
                    task_desc = completed_tasks[_experiment_named_id]

                    if task_desc["rc"] != 0:
                        if self.opt.rerun_non_rc0:
                            self.logger.debug(
                                "task {} was already executed, "
                                "but with rc={}. rerunning.".format(
                                    _experiment_named_id, task_desc["rc"]
                                )
                            )
                            (
                                cmd,
                                human_cmd,
                                experiment_path,
                            ) = self.prepare_single_setup(
                                named_combination, i, pool_index
                            )

                            experiment_descs[pool_index].append(
                                (
                                    i,
                                    _experiment_named_id,
                                    named_combination,
                                    cmd,
                                    human_cmd,
                                    experiment_path,
                                )
                            )

                            previous_tasks["new"] += 1
                            del completed_tasks[_experiment_named_id]
                        else:
                            self.logger.debug(
                                "task {} was already executed, but with rc={}. not "
                                "rerunning.".format(
                                    _experiment_named_id, task_desc["rc"]
                                )
                            )
                            previous_tasks["rcnon0"] += 1
                    else:
                        # rerun tasks where the rc != 0 (always rerun tasks that have
                        # not been executed at all, yet)
                        self.logger.debug(
                            "skipping experiment: {}".format(_experiment_named_id)
                        )
                        self.logger.debug(
                            "previous result: {}".format(
                                completed_tasks[_experiment_named_id]
                            )
                        )
                        previous_tasks["rc0"] += 1
                else:
                    (cmd, human_cmd, experiment_path,) = self.prepare_single_setup(
                        named_combination, i, pool_index
                    )

                    experiment_descs[pool_index].append(
                        (
                            i,
                            _experiment_named_id,
                            named_combination,
                            cmd,
                            human_cmd,
                            experiment_path,
                        )
                    )
                    previous_tasks["new"] += 1
                pbar.update(1)

        self.logger.info(
            "summary (new is also increased for tasks that were executed previously "
            "but yielded rc!=0 - if rerun_non_rc0==True"
        )
        self.logger.info("{}".format(previous_tasks))

        self.logger.info("starting {} experiments".format(self.combination_count))
        self.logger.info(
            "creating {} process pools with each 1 worker".format(self.opt.num_workers)
        )

        if self.cuda_devices and len(self.cuda_devices) != self.opt.num_workers:
            self.logger.warning(
                "number of cuda devices does not match number of workers: "
                "{} vs. {}".format(len(self.cuda_devices), self.opt.num_workers)
            )

        manager = multiprocessing.Manager()
        running_processes = manager.dict()
        for pool_index in range(self.opt.num_workers):
            pool = multiprocessing.Pool(processes=1, maxtasksperchild=1)
            for desc in experiment_descs[pool_index]:
                proc_args = desc + (running_processes,)  # must be a tuple
                pool.apply_async(
                    start_worker,
                    args=proc_args,
                    callback=on_task_done,
                    error_callback=on_task_error,
                )
            self.logger.info(
                f"created pool with {len(experiment_descs[pool_index])} tasks, each "
                f"processed by 1 worker"
            )

        self.logger.info("waiting for workers to complete all jobs...")
        prev_count_done = 0
        with tqdm(total=previous_tasks["new"], initial=prev_count_done) as pbar:
            while completed_tasks_in_this_run_count < previous_tasks["new"]:
                time.sleep(10)
                update_inc = completed_tasks_in_this_run_count - prev_count_done

                if update_inc > 0:
                    pbar.update(update_inc)
                    prev_count_done = completed_tasks_in_this_run_count
                    completed_tasks.sync_to_disk()

                best_dev_snem, best_experiment_id = self._get_best_dev_snem()
                sorted_running_procs = sorted(
                    self._get_running_processes(running_processes),
                    key=lambda running_device: running_device[1],
                )
                pbar.set_postfix_str(
                    f"dev-snem: {best_dev_snem:.3f} ({best_experiment_id}); prcs: {sorted_running_procs}"
                )

        # save to disk
        completed_tasks.sync_to_disk()
        self.logger.info(
            f"finished all tasks ({completed_tasks_in_this_run_count} of "
            f"{previous_tasks['new']})"
        )

        # clone the results so that we can process them while not modifying the original
        processed_results = dict(completed_tasks)

        experiments_rc_overview = Counter()
        non_okay_experiment_ids = []
        for experiment_named_id, experiment_result in processed_results.items():
            rc = experiment_result["rc"]
            experiments_rc_overview[rc] += 1

            if rc != 0:
                if rc == 99:
                    pass
                else:
                    non_okay_experiment_ids.append(experiment_result["experiment_id"])

        self.logger.warning(
            f"{len(non_okay_experiment_ids)} experiments did not return 0: "
            f"{sorted(non_okay_experiment_ids)}"
        )

        # snem-based performance sort
        sorted_results = list(dict(processed_results).values())
        for result in sorted_results:
            if result["details"]:
                result["dev_snem"] = result["details"]["dev_stats"][self.snem]
                del result["details"]
            else:
                result["dev_snem"] = -1.0
        sorted_results.sort(key=lambda x: x["dev_snem"], reverse=True)
        headers = list(sorted_results[0].keys())
        rows = [x.values() for x in sorted_results]

        self.logger.info("all experiments finished. statistics:")
        self.logger.debug("snem-based performances:")
        self.logger.debug("\n" + tabulate(rows, headers))
        self.logger.info("return codes: {}".format(experiments_rc_overview))
        self.logger.info(
            "best dev-snem: %s (id: %s)",
            sorted_results[0]["dev_snem"],
            sorted_results[0]["experiment_id"],
        )

    def _get_best_dev_snem(self):
        best_dev_snem = -1.0
        experiment_id = -1
        # to avoid that the dict is modified while iterating it, copy it for temporary use
        # if we're unlucky this could happen otherwise: RuntimeError: dictionary changed size during iteration
        tmp_tasks = completed_tasks.copy()
        for task in tmp_tasks.values():
            if task.get("details") and task["details"].get("dev_stats"):
                best_dev_snem = max(
                    best_dev_snem, task["details"]["dev_stats"][self.snem]
                )
                experiment_id = task["experiment_id"]
        return best_dev_snem, experiment_id

    def _get_running_processes(self, running_processes):
        return [
            (exp_id, running_device[1])
            for exp_id, running_device in running_processes.items()
            if running_device[0]
        ]


if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument("--dataset", default=None, type=str)
    parser.add_argument("--experiments_path", default="./experiments", type=str)
    parser.add_argument(
        "--continue_run", type=str2bool, nargs="?", const=True, default=True
    )
    parser.add_argument(
        "--rerun_non_rc0", type=str2bool, nargs="?", const=True, default=True
    )
    parser.add_argument("--num_workers", type=int, default=1)
    parser.add_argument("--results_path", type=str, default=None)
    parser.add_argument("--combi_mode", type=str, required=True)
    parser.add_argument("--combi_id", type=int, default=0)
    parser.add_argument(
        "--cuda_devices",
        type=str,
        default=None,
        help="Comma separated list of cuda device IDs, e.g., "
        "0,1,2,3; or SGE_GPU to read this list from "
        "the environment variable SGE_GPU. If not defined,"
        "CPU will be used instead of GPU.",
    )
    parser.add_argument("--num_runs_per_experiment", type=int, default=1)
    parser.add_argument(
        "--only_calc_combinations", type=str2bool, nargs="?", const=True, default=False
    )
    opt = parser.parse_args()

    if opt.only_calc_combinations:
        SetupController(opt)
    else:
        SetupController(opt).run()


================================================
FILE: NewsSentiment/controller_data/datasets/NewsMTSC-dataset/devtest_mt.jsonl
================================================
{"primary_gid": "allsides_1002_402_12_former FBI director James B. Comey_51_56", "sentence_normalized": "While White House officials said in the days after Comey's dismissal that it was largely the result of a memo written by Deputy Attorney General Rod J. Rosenstein criticizing the FBI director's handling of the investigation into Hillary Clinton’s use of a private email server when she was secretary of state, Trump suggested in the NBC interview that the Russian investigation played a role in his decision.", "targets": [{"Input.gid": "allsides_1002_402_12_Hillary Clinton’s_229_246", "from": 229, "to": 246, "mention": "Hillary Clinton’s", "polarity": 2.0, "further_mentions": [{"from": 282, "to": 285, "mention": "she"}]}, {"Input.gid": "allsides_1002_402_12_former FBI director James B. Comey_51_56", "from": 51, "to": 56, "mention": "Comey", "polarity": 2.0}]}
{"primary_gid": "allsides_112_45_4_Stedman Graham_0_6", "sentence_normalized": "Graham's comment only reinforced growing rumors that Winfrey is seriously considering a presidential bid.", "targets": [{"Input.gid": "allsides_112_45_4_Stedman Graham_0_6", "from": 0, "to": 6, "mention": "Graham", "polarity": 4.0}, {"Input.gid": "allsides_112_45_4_Winfrey_53_60", "from": 53, "to": 60, "mention": "Winfrey", "polarity": 4.0}]}
{"primary_gid": "allsides_115_46_35_White House adviser Stephen Miller_66_72", "sentence_normalized": "\"I think I've wasted enough of my viewers' time,\" Tapper said, as Miller attempted to keep talking.", "targets": [{"Input.gid": "allsides_115_46_35_White House adviser Stephen Miller_66_72", "from": 66, "to": 72, "mention": "Miller", "polarity": 2.0}, {"Input.gid": "allsides_115_46_35_host Jake Tapper_50_56", "from": 50, "to": 56, "mention": "Tapper", "polarity": 4.0}]}
{"primary_gid": "allsides_1164_465_5_President Trump_31_46", "sentence_normalized": "Pence had been in contact with President Trump about the test.", "targets": [{"Input.gid": "allsides_1164_465_5_Pence_0_5", "from": 0, "to": 5, "mention": "Pence", "polarity": 4.0}, {"Input.gid": "allsides_1164_465_5_President Trump_31_46", "from": 31, "to": 46, "mention": "President Trump", "polarity": 4.0}]}
{"primary_gid": "allsides_1166_466_62_Gervais_216_223", "sentence_normalized": "“It may reflect any combination of genuine innumeracy [lack of math skills], incomprehension of an oddly phrased item, participant inattentiveness or jesting, sampling error, or a genuine flaw in the ... technique,” Gervais and Najle write in the paper.", "targets": [{"Input.gid": "allsides_1166_466_62_Gervais_216_223", "from": 216, "to": 223, "mention": "Gervais", "polarity": 4.0}, {"Input.gid": "allsides_1166_466_62_Najle_228_233", "from": 228, "to": 233, "mention": "Najle", "polarity": 4.0}]}
{"primary_gid": "allsides_1183_473_1_Assad_150_182", "sentence_normalized": "U.S. Ambassador to the United Nations Nikki Haley and Secretary of State Rex Tillerson on Sunday appeared to offer differing views on the future of Syrian President Bashar al-Assad.", "targets": [{"Input.gid": "allsides_1183_473_1_Haley_46_51", "from": 44, "to": 49, "mention": "Haley", "polarity": 4.0}, {"Input.gid": "allsides_1183_473_1_Assad_150_182", "from": 148, "to": 180, "mention": "Syrian President Bashar al-Assad", "polarity": 4.0}]}
{"primary_gid": "allsides_1183_473_22_Assad_201_206", "sentence_normalized": "In a separate interview on CBS's Face the Nation, Tillerson said it was the goal of the U.S. and its allies to \"navigate a political outcome in which the Syrian people in fact will determine Bashar al-Assad's fate and his legitimacy,\" citing in part \"the United States' own founding principles are self-determination.\"", "targets": [{"Input.gid": "allsides_1183_473_22_Tillerson_50_59", "from": 50, "to": 59, "mention": "Tillerson", "polarity": 6.0}, {"Input.gid": "allsides_1183_473_22_Assad_201_206", "from": 201, "to": 206, "mention": "Assad", "polarity": 2.0}]}
{"primary_gid": "allsides_1183_473_3_Assad_237_242", "sentence_normalized": "[Despite U.S. missile barrage, Syria continues airstrikes against rebels] Haley indicated in an interview on CNN's “State of the Union” that the United States does not see a peaceful political resolution for Syria's civil war as long as Assad remains in power.”", "targets": [{"Input.gid": "allsides_1183_473_3_Assad_237_242", "from": 237, "to": 242, "mention": "Assad", "polarity": 2.0}, {"Input.gid": "allsides_1183_473_3_Haley_74_79", "from": 74, "to": 79, "mention": "Haley", "polarity": 4.0}]}
{"primary_gid": "allsides_1185_473_12_U.S. Ambassador to the United Nations Nikki Haley_171_173", "sentence_normalized": "Tillerson conceded that removing Assad from power could \"ultimately\" require greater pressure, including military action, from the U.S. or an international coalition, but he said that isn't the preferred choice.", "targets": [{"Input.gid": "allsides_1185_473_12_Assad_33_38", "from": 33, "to": 38, "mention": "Assad", "polarity": 2.0}, {"Input.gid": "allsides_1185_473_12_U.S. Ambassador to the United Nations Nikki Haley_171_173", "from": 171, "to": 173, "mention": "he", "polarity": 4.0}]}
{"primary_gid": "allsides_1197_477_133_Yazan al-Saadi_29_43", "sentence_normalized": "AMY GOODMAN: But last night— YAZAN AL-SAADI: He’s playing a game.", "targets": [{"Input.gid": "allsides_1197_477_133_AMY GOODMAN_0_11", "from": 0, "to": 11, "mention": "AMY GOODMAN", "polarity": 4.0}, {"Input.gid": "allsides_1197_477_133_Yazan al-Saadi_29_43", "from": 29, "to": 43, "mention": "YAZAN AL-SAADI", "polarity": 4.0}]}
{"primary_gid": "allsides_1197_477_24_Yazan al-Saadi_70_84", "sentence_normalized": "AMY GOODMAN: For more, we are going to Lebanon, where we’re joined by Yazan al-Saadi, Syrian-Canadian writer, researcher based in Beirut.", "targets": [{"Input.gid": "allsides_1197_477_24_AMY GOODMAN_0_11", "from": 0, "to": 11, "mention": "AMY GOODMAN", "polarity": 4.0}, {"Input.gid": "allsides_1197_477_24_Yazan al-Saadi_70_84", "from": 70, "to": 84, "mention": "Yazan al-Saadi", "polarity": 4.0}]}
{"primary_gid": "allsides_1280_512_28_Senate Minority Leader Chuck Schumer (D-N.Y.)_19_26", "sentence_normalized": "Bharara was once a Schumer aide.", "targets": [{"Input.gid": "allsides_1280_512_28_Bharara_0_7", "from": 0, "to": 7, "mention": "Bharara", "polarity": 4.0}, {"Input.gid": "allsides_1280_512_28_Senate Minority Leader Chuck Schumer (D-N.Y.)_19_26", "from": 19, "to": 26, "mention": "Schumer", "polarity": 4.0}]}
{"primary_gid": "allsides_1284_514_13_Mr. Trump_125_134", "sentence_normalized": "Tom Perez, labor secretary in the Obama administration and now chairman of the Democratic National Committee, countered that Mr. Trump had “absolutely nothing” to do with the job gains.", "targets": [{"Input.gid": "allsides_1284_514_13_Tom Perez, labor secretary in the Obama administration and now chairman of the Democratic National Committee_0_108", "from": 0, "to": 108, "mention": "Tom Perez, labor secretary in the Obama administration and now chairman of the Democratic National Committee", "polarity": 4.0}, {"Input.gid": "allsides_1284_514_13_Mr. Trump_125_134", "from": 125, "to": 134, "mention": "Mr. Trump", "polarity": 2.0}]}
{"primary_gid": "allsides_1299_521_1_former president Barack Obama_46_75", "sentence_normalized": "President Trump on Saturday angrily accused former president Barack Obama of orchestrating a “Nixon/Watergate” plot to tap the phones at his Trump Tower headquarters last fall in the run-up to the election.", "targets": [{"Input.gid": "allsides_1299_521_1_— Donald J. Trump (@realDonaldTrump)_12_17", "from": 10, "to": 15, "mention": "Trump", "polarity": 2.0}, {"Input.gid": "allsides_1299_521_1_former president Barack Obama_46_75", "from": 44, "to": 73, "mention": "former president Barack Obama", "polarity": 2.0}]}
{"primary_gid": "allsides_1299_521_40_Obama_118_133", "sentence_normalized": "— Donald J. Trump (@realDonaldTrump) March 4, 2017 I'd bet a good lawyer could make a great case out of the fact that President Obama was tapping my phones in October, just prior to Election!", "targets": [{"Input.gid": "allsides_1299_521_40_Obama_118_133", "from": 118, "to": 133, "mention": "President Obama", "polarity": 2.0}, {"Input.gid": "allsides_1299_521_40_— Donald J. Trump (@realDonaldTrump)_0_36", "from": 0, "to": 36, "mention": "— Donald J. Trump (@realDonaldTrump)", "polarity": 4.0, "further_mentions": [{"from": 12, "to": 17, "mention": "Trump"}]}]}
{"primary_gid": "allsides_1299_521_4_former president Barack Obama_201_206", "sentence_normalized": "Trump offered no citations nor did he point to any credible news report to back up his accusation, but he may have been referring to commentary on Breitbart and conservative talk radio suggesting that Obama and his administration used “police state” tactics last fall to monitor the Trump team.", "targets": [{"Input.gid": "allsides_1299_521_4_— Donald J. Trump (@realDonaldTrump)_0_5", "from": 0, "to": 5, "mention": "Trump", "polarity": 2.0}, {"Input.gid": "allsides_1299_521_4_former president Barack Obama_201_206", "from": 201, "to": 206, "mention": "Obama", "polarity": 2.0, "further_mentions": [{"from": 211, "to": 214, "mention": "his"}]}]}
{"primary_gid": "allsides_1370_550_24_Joe Manchin_39_50", "sentence_normalized": "The one Democrat to vote for Sessions, Joe Manchin of West Virginia, explained his decision to reporters after the vote.", "targets": [{"Input.gid": "allsides_1370_550_24_Jeff Sessions_29_37", "from": 29, "to": 37, "mention": "Sessions", "polarity": 4.0}, {"Input.gid": "allsides_1370_550_24_Joe Manchin_39_50", "from": 39, "to": 50, "mention": "Joe Manchin", "polarity": 4.0, "further_mentions": [{"from": 79, "to": 82, "mention": "his"}]}]}
{"primary_gid": "allsides_1370_550_28_Joe Manchin_30_33", "sentence_normalized": "Sessions’ confirmation leaves his Senate seat vacant.", "targets": [{"Input.gid": "allsides_1370_550_28_Jeff Sessions_0_8", "from": 0, "to": 8, "mention": "Sessions", "polarity": 4.0}, {"Input.gid": "allsides_1370_550_28_Joe Manchin_30_33", "from": 30, "to": 33, "mention": "his", "polarity": 4.0}]}
{"primary_gid": "allsides_1374_552_42_Betsy DeVos_23_28", "sentence_normalized": "But to the extent that DeVos—and Trump, too, who has been outspoken on the need for more school choice—are in favor of giving more students and more parents more choices when it comes educating their kids, they are on the side of the angels.", "targets": [{"Input.gid": "allsides_1374_552_42_President Trump_33_38", "from": 33, "to": 38, "mention": "Trump", "polarity": 6.0}, {"Input.gid": "allsides_1374_552_42_Betsy DeVos_23_28", "from": 23, "to": 28, "mention": "DeVos", "polarity": 6.0}]}
{"primary_gid": "allsides_1381_555_6_UC Berkeley Chancellor Nicholas Dirks_14_51", "sentence_normalized": "But actually, UC Berkeley Chancellor Nicholas Dirks had steadfastly defended the right of the Republicans to invite Yiannopoulos to speak, rejecting a request by a group of professors that the Breitbart News writer's appearance be canceled because he engaged in \"hate speech\" and, based on his appearance at another university, might harass or belittle individual students.", "targets": [{"Input.gid": "allsides_1381_555_6_UC Berkeley Chancellor Nicholas Dirks_14_51", "from": 14, "to": 51, "mention": "UC Berkeley Chancellor Nicholas Dirks", "polarity": 6.0, "further_mentions": [{"from": 248, "to": 250, "mention": "he"}, {"from": 290, "to": 293, "mention": "his"}]}, {"Input.gid": "allsides_1381_555_6_Yiannopoulos_116_128", "from": 116, "to": 128, "mention": "Yiannopoulos", "polarity": 2.0}]}
{"primary_gid": "allsides_1401_563_12_Yates_49_54", "sentence_normalized": "For inexplicable reasons, the new president left Yates in place to run the Justice Department in anticipation of the confirmation of Senator Jeff Sessions.", "targets": [{"Input.gid": "allsides_1401_563_12_Yates_49_54", "from": 49, "to": 54, "mention": "Yates", "polarity": 2.0}, {"Input.gid": "allsides_1401_563_12_Senator Jeff Sessions_133_154", "from": 133, "to": 154, "mention": "Senator Jeff Sessions", "polarity": 4.0}]}
{"primary_gid": "allsides_1460_588_10_President-elect Donald Trump_62_90", "sentence_normalized": "Tillerson also wouldn't bite when Rubio, a former opponent of President-elect Donald Trump during the Republican presidential primary, tried to get Tillerson to say Putin murdered political foes.", "targets": [{"Input.gid": "allsides_1460_588_10_brand Russian President Vladimir Putin_165_170", "from": 165, "to": 170, "mention": "Putin", "polarity": 2.0}, {"Input.gid": "allsides_1460_588_10_President-elect Donald Trump_62_90", "from": 62, "to": 90, "mention": "President-elect Donald Trump", "polarity": 4.0}]}
{"primary_gid": "allsides_1494_602_2_Putin_349_363", "sentence_normalized": "Lauren Gambino and  Ben Jacobs in Washington Sat 31 Dec 2016 00.39 GMT First published on Fri 30 Dec 2016 18.41 GMT After the Obama administration’s tough new sanctions against Russia put the president-elect in a vulnerable political position at home, in his own party and abroad, Donald Trump chose to respond in familiar fashion – with praise for Vladimir Putin.", "targets": [{"Input.gid": "allsides_1494_602_2_Putin_349_363", "from": 349, "to": 363, "mention": "Vladimir Putin", "polarity": 2.0}, {"Input.gid": "allsides_1494_602_2_Trump_288_293", "from": 288, "to": 293, "mention": "Trump", "polarity": 2.0}, {"Input.gid": "allsides_1494_602_2_Obama_126_131", "from": 126, "to": 131, "mention": "Obama", "polarity": 6.0}]}
{"primary_gid": "allsides_1561_630_7_retired Marine General John Kelly_3_5", "sentence_normalized": "As he considers who to surround himself with, Trump is calling on President Obama for counsel.", "targets": [{"Input.gid": "allsides_1561_630_7_retired Marine General John Kelly_3_5", "from": 3, "to": 5, "mention": "he", "polarity": 4.0, "further_mentions": [{"from": 32, "to": 39, "mention": "himself"}]}, {"Input.gid": "allsides_1561_630_7_Obama_66_81", "from": 66, "to": 81, "mention": "President Obama", "polarity": 6.0}]}
{"primary_gid": "allsides_1616_652_5_President-elect Donald Trump_13_15", "sentence_normalized": "In doing so, he adds some diversity to his cabinet (Haley is his first female addition to his senior leadership) and also throws a bone to establishment conservatives by adding one of their favorites.", "targets": [{"Input.gid": "allsides_1616_652_5_President-elect Donald Trump_13_15", "from": 13, "to": 15, "mention": "he", "polarity": 6.0, "further_mentions": [{"from": 39, "to": 42, "mention": "his"}]}, {"Input.gid": "allsides_1616_652_5_Nikki Haley_52_57", "from": 52, "to": 57, "mention": "Haley", "polarity": 6.0, "further_mentions": [{"from": 61, "to": 64, "mention": "his"}, {"from": 90, "to": 93, "mention": "his"}]}]}
{"primary_gid": "allsides_1635_660_21_Richard Shelby (R-Ala.)_0_23", "sentence_normalized": "Richard Shelby (R-Ala.) had issued a statement Thursday night that said Sessions had the necessary experience to be the nation’s top law enforcement official.", "targets": [{"Input.gid": "allsides_1635_660_21_Richard Shelby (R-Ala.)_0_23", "from": 0, "to": 23, "mention": "Richard Shelby (R-Ala.)", "polarity": 4.0}, {"Input.gid": "allsides_1635_660_21_Sessions_72_80", "from": 72, "to": 80, "mention": "Sessions", "polarity": 6.0}]}
{"primary_gid": "allsides_1683_684_15_FBI Director James Comey_37_42", "sentence_normalized": "“I cannot think of any reason except Comey’s own personal interests to make public the possibility that there may be emails whose content he does not know that may be relevant to the investigation,” Gertner said.", "targets": [{"Input.gid": "allsides_1683_684_15_Gertner_199_206", "from": 199, "to": 206, "mention": "Gertner", "polarity": 4.0}, {"Input.gid": "allsides_1683_684_15_FBI Director James Comey_37_42", "from": 37, "to": 42, "mention": "Comey", "polarity": 2.0, "further_mentions": [{"from": 138, "to": 140, "mention": "he"}]}]}
{"primary_gid": "allsides_1684_684_15_former director L. Patrick Gray_82_113", "sentence_normalized": "“Comey’s letter to the Hill was the most embarrassing moment for the Bureau since former director L. Patrick Gray burned Watergate documents in his fireplace,” diGenova judges.", "targets": [{"Input.gid": "allsides_1684_684_15_former director L. Patrick Gray_82_113", "from": 82, "to": 113, "mention": "former director L. Patrick Gray", "polarity": 2.0}, {"Input.gid": "allsides_1684_684_15_FBI Director James Comey_1_6", "from": 1, "to": 6, "mention": "Comey", "polarity": 2.0}]}
{"primary_gid": "allsides_1696_690_32_Gingrich_70_78", "sentence_normalized": "This article has been updated with additional comments from Trump and Gingrich.", "targets": [{"Input.gid": "allsides_1696_690_32_Donald Trump_60_65", "from": 60, "to": 65, "mention": "Trump", "polarity": 4.0}, {"Input.gid": "allsides_1696_690_32_Gingrich_70_78", "from": 70, "to": 78, "mention": "Gingrich", "polarity": 4.0}]}
{"primary_gid": "allsides_1715_698_3_Donald Trump's_185_190", "sentence_normalized": "Foval describes colluding with Bob Creamer, co-founder of consulting group Democracy Partners, to \"put people in the line, at the front . . . to get in front at the rally, so that when Trump comes down the rope line, they’re the ones asking him the question in front of the reporter, because they’re pre-placed there.\"", "targets": [{"Input.gid": "allsides_1715_698_3_Foval_0_5", "from": 0, "to": 5, "mention": "Foval", "polarity": 2.0}, {"Input.gid": "allsides_1715_698_3_Donald Trump's_185_190", "from": 185, "to": 190, "mention": "Trump", "polarity": 4.0, "further_mentions": [{"from": 241, "to": 244, "mention": "him"}]}]}
{"primary_gid": "allsides_1718_700_12_Democratic rival Hillary Clinton_128_135", "sentence_normalized": "He cited the example of a hacked email recently released by WikiLeaks that shows that representatives from Qatar in 2012, while Clinton was secretary of state, apparently tried to get a quick meeting with Clinton’s husband, former President Bill Clinton, to give him a $1 million check for the family foundation.", "targets": [{"Input.gid": "allsides_1718_700_12_Tim Kaine_0_2", "from": 0, "to": 2, "mention": "He", "polarity": 4.0, "further_mentions": [{"from": 263, "to": 266, "mention": "him"}]}, {"Input.gid": "allsides_1718_700_12_Democratic rival Hillary Clinton_128_135", "from": 128, "to": 135, "mention": "Clinton", "polarity": 2.0, "further_mentions": [{"from": 205, "to": 212, "mention": "Clinton"}]}]}
{"primary_gid": "allsides_1728_704_1_Donald Trump_42_54", "sentence_normalized": "Seven months ago, on the ides of March, Donald Trump won every primary contest except Ohio, knocked Marco Rubio out of the race, and left the Republican Party’s leaders facing a stark choice.", "targets": [{"Input.gid": "allsides_1728_704_1_Marco Rubio_102_113", "from": 100, "to": 111, "mention": "Marco Rubio", "polarity": 2.0}, {"Input.gid": "allsides_1728_704_1_Donald Trump_42_54", "from": 40, "to": 52, "mention": "Donald Trump", "polarity": 6.0}]}
{"primary_gid": "allsides_1735_706_5_Hillary Clinton_37_44", "sentence_normalized": "SEE ALSO: ‘Locker-room talk’ prompts Clinton attacks; Trump apologies THE FACTS: He certainly didn’t own up to sexual assault in his boastful remarks in 2005.", "targets": [{"Input.gid": "allsides_1735_706_5_TRUMP_54_59", "from": 54, "to": 59, "mention": "Trump", "polarity": 2.0}, {"Input.gid": "allsides_1735_706_5_Hillary Clinton_37_44", "from": 37, "to": 44, "mention": "Clinton", "polarity": 2.0}]}
{"primary_gid": "allsides_1737_707_2_Cooper_32_38", "sentence_normalized": "Then, Trump questioned Anderson Cooper, who moderated along with Martha Raddatz as to why he hasn't done his job as a journalist and mentioned the Democratic nominee's email scandal.", "targets": [{"Input.gid": "allsides_1737_707_2_Martha Raddatz_65_80", "from": 65, "to": 79, "mention": "Martha Raddatz", "polarity": 4.0}, {"Input.gid": "allsides_1737_707_2_Cooper_32_38", "from": 32, "to": 38, "mention": "Cooper", "polarity": 2.0}]}
{"primary_gid": "allsides_1737_707_5_Cooper_53_59", "sentence_normalized": "After 50 minutes of the debate, the RNC tallied that Cooper and Raddatz had interrupted Trump 14 times, and Clinton just three times.", "targets": [{"Input.gid": "allsides_1737_707_5_Cooper_53_59", "from": 53, "to": 59, "mention": "Cooper", "polarity": 2.0}, {"Input.gid": "allsides_1737_707_5_Martha Raddatz_64_71", "from": 64, "to": 71, "mention": "Raddatz", "polarity": 2.0}]}
{"primary_gid": "allsides_173_71_1_host Savannah Guthrie_78_99", "sentence_normalized": "House Speaker Paul Ryan had a tough time on the “Today Show” Wednesday when host Savannah Guthrie asked if he was “living in a fantasy world.”", "targets": [{"Input.gid": "allsides_173_71_1_host Savannah Guthrie_78_99", "from": 76, "to": 97, "mention": "host Savannah Guthrie", "polarity": 4.0}, {"Input.gid": "allsides_173_71_1_Paul Ryan_16_25", "from": 14, "to": 23, "mention": "Paul Ryan", "polarity": 2.0}]}
{"primary_gid": "allsides_1742_709_36_Donald Trump:_9_14", "sentence_normalized": "Bush and Trump on that bus are, in so many ways, the apotheosis of what so many of Hillary Clinton’s supporters are ready to overturn: the musty sleaziness that went out of style in the 1970s; the old bosses who want their secretaries pretty; the cigar-chomping power brokers who think sexual harassment is the woman’s problem; the drooling dimwits who have gotten further than they should have on connections and male privilege.", "targets": [{"Input.gid": "allsides_1742_709_36_Donald Trump:_9_14", "from": 9, "to": 14, "mention": "Trump", "polarity": 2.0}, {"Input.gid": "allsides_1742_709_36_Bush_0_4", "from": 0, "to": 4, "mention": "Bush", "polarity": 2.0}]}
{"primary_gid": "allsides_1749_712_8_Tim Kaine of Virginia_0_2", "sentence_normalized": "He repeatedly dragged the conversation back to issues about racial justice, from policing to immigration, which worked to put Pence on the defensive while appealing to black and Latino voters (and anyone, really, who cares about racial justice).", "targets": [{"Input.gid": "allsides_1749_712_8_Pence_126_131", "from": 126, "to": 131, "mention": "Pence", "polarity": 2.0}, {"Input.gid": "allsides_1749_712_8_Tim Kaine of Virginia_0_2", "from": 0, "to": 2, "mention": "He", "polarity": 6.0}]}
{"primary_gid": "allsides_1750_712_5_Mike Pence_0_5", "sentence_normalized": "Pence deftly ignored much of Kaine’s immature invective and directed the audience’s attention to Hillary’s failed record and the clear themes of the Trump campaign.", "targets": [{"Input.gid": "allsides_1750_712_5_Mike Pence_0_5", "from": 0, "to": 5, "mention": "Pence", "polarity": 6.0}, {"Input.gid": "allsides_1750_712_5_Hillary_97_104", "from": 97, "to": 104, "mention": "Hillary", "polarity": 2.0}, {"Input.gid": "allsides_1750_712_5_Kaine_29_34", "from": 29, "to": 34, "mention": "Kaine", "polarity": 2.0}]}
{"primary_gid": "allsides_1750_712_7_Mike Pence_0_5", "sentence_normalized": "Pence, speaking much more slowly and authoritatively, looked directly at the camera (something Kaine never did) and reiterated basic points about Hillary’s tax-and-spend policies and feckless foreign policy.", "targets": [{"Input.gid": "allsides_1750_712_7_Kaine_95_100", "from": 95, "to": 100, "mention": "Kaine", "polarity": 2.0}, {"Input.gid": "allsides_1750_712_7_Mike Pence_0_5", "from": 0, "to": 5, "mention": "Pence", "polarity": 6.0}]}
{"primary_gid": "allsides_1763_718_43_Hillary Clinton_8_15", "sentence_normalized": "Why let Hillary and Bill off the hook?", "targets": [{"Input.gid": "allsides_1763_718_43_Bill_20_24", "from": 20, "to": 24, "mention": "Bill", "polarity": 2.0}, {"Input.gid": "allsides_1763_718_43_Hillary Clinton_8_15", "from": 8, "to": 15, "mention": "Hillary", "polarity": 2.0}]}
{"primary_gid": "allsides_1765_719_38_Alicia Machado_47_58", "sentence_normalized": "Regardless of how much Hillary Clinton wants Ms. Machado to be the poster child for misused women, she doesn’t fit the narrative.", "targets": [{"Input.gid": "allsides_1765_719_38_Alicia Machado_47_58", "from": 45, "to": 56, "mention": "Ms. Machado", "polarity": 2.0}, {"Input.gid": "allsides_1765_719_38_Hillary Clinton_25_40", "from": 23, "to": 38, "mention": "Hillary Clinton", "polarity": 2.0, "further_mentions": [{"from": 99, "to": 102, "mention": "she"}]}]}
{"primary_gid": "allsides_1766_719_46_Trump_231_236", "sentence_normalized": "Speaking to Clinton's traveling press pool Friday morning, the former secretary of state's communications director, Jennifer Palmieri, said lashing out at women after a poor debate performance has become something of a pattern for Trump, who also feuded with Fox News anchor Megyn Kelly after the first Republican primary debate.", "targets": [{"Input.gid": "allsides_1766_719_46_Clinton_12_19", "from": 12, "to": 19, "mention": "Clinton", "polarity": 4.0}, {"Input.gid": "allsides_1766_719_46_Trump_231_236", "from": 231, "to": 236, "mention": "Trump", "polarity": 2.0}]}
{"primary_gid": "allsides_1771_722_10_Trump_80_85", "sentence_normalized": "In near uniformity, the voters said the outcome of the debate was the result of Trump’s failure rather than Clinton’s success.", "targets": [{"Input.gid": "allsides_1771_722_10_Trump_80_85", "from": 80, "to": 85, "mention": "Trump", "polarity": 2.0}, {"Input.gid": "allsides_1771_722_10_Hillary Clinton_108_115", "from": 108, "to": 115, "mention": "Clinton", "polarity": 4.0}]}
{"primary_gid": "allsides_1771_722_31_Hillary Clinton_1_16", "sentence_normalized": "“Hillary Clinton is not a good candidate and Donald Trump is just a despicable person,” Nicole Gerson, an attorney in Philadelphia, reflected after the debate.", "targets": [{"Input.gid": "allsides_1771_722_31_Trump_45_57", "from": 45, "to": 57, "mention": "Donald Trump", "polarity": 2.0}, {"Input.gid": "allsides_1771_722_31_Hillary Clinton_1_16", "from": 1, "to": 16, "mention": "Hillary Clinton", "polarity": 2.0}]}
{"primary_gid": "allsides_1772_722_16_Donald Trump_127_132", "sentence_normalized": "Edward Panetta, professor of communication studies at the University of Georgia and director of the Georgia Debate Union, said Trump got out of the gate fast, but then struggled.", "targets": [{"Input.gid": "allsides_1772_722_16_Panetta_0_120", "from": 0, "to": 120, "mention": "Edward Panetta, professor of communication studies at the University of Georgia and director of the Georgia Debate Union", "polarity": 4.0}, {"Input.gid": "allsides_1772_722_16_Donald Trump_127_132", "from": 127, "to": 132, "mention": "Trump", "polarity": 2.0}]}
{"primary_gid": "allsides_1772_722_17_Donald Trump_7_19", "sentence_normalized": "“While Donald Trump was strong in the first 20 minutes of the debate he faltered badly as the debate progressed,” Panetta said.", "targets": [{"Input.gid": "allsides_1772_722_17_Panetta_114_121", "from": 114, "to": 121, "mention": "Panetta", "polarity": 4.0}, {"Input.gid": "allsides_1772_722_17_Donald Trump_7_19", "from": 7, "to": 19, "mention": "Donald Trump", "polarity": 2.0, "further_mentions": [{"from": 69, "to": 71, "mention": "he"}]}]}
{"primary_gid": "allsides_1811_738_0_Hillary_25_32", "sentence_normalized": "Colin Powell: Everything Hillary Touches She Screws Up With Hubris", "targets": [{"Input.gid": "allsides_1811_738_0_Hillary_25_32", "from": 25, "to": 32, "mention": "Hillary", "polarity": 2.0, "further_mentions": [{"from": 41, "to": 44, "mention": "She"}]}, {"Input.gid": "allsides_1811_738_0_former Secretary of State Colin Powell_6_12", "from": 6, "to": 12, "mention": "Powell", "polarity": 4.0}]}
{"primary_gid": "allsides_1904_775_2_Hillary Clinton's_0_16", "sentence_normalized": "\"Hillary Clinton has turned over the only records nobody wants to see from her,\" said spokesman Jason Miller.", "targets": [{"Input.gid": "allsides_1904_775_2_Hillary Clinton's_0_16", "from": 0, "to": 16, "mention": "\"Hillary Clinton", "polarity": 2.0, "further_mentions": [{"from": 1, "to": 16, "mention": "Hillary Clinton"}, {"from": 75, "to": 78, "mention": "her"}]}, {"Input.gid": "allsides_1904_775_2_Miller_102_108", "from": 102, "to": 108, "mention": "Miller", "polarity": 4.0}]}
{"primary_gid": "allsides_1905_775_1_Hillary Clinton_2_17", "sentence_normalized": "Hillary Clinton and her running mate, Tim Kaine, released a new batch of their own income tax returns on Friday, ratcheting up the pressure on her opponent, Donald J. Trump, to begin making public his own forms.", "targets": [{"Input.gid": "allsides_1905_775_1_Hillary Clinton_2_17", "from": 0, "to": 15, "mention": "Hillary Clinton", "polarity": 6.0, "further_mentions": [{"from": 143, "to": 146, "mention": "her"}, {"from": 20, "to": 23, "mention": "her"}]}, {"Input.gid": "allsides_1905_775_1_Tim Kaine_40_49", "from": 38, "to": 47, "mention": "Tim Kaine", "polarity": 4.0}]}
{"primary_gid": "allsides_194_79_4_John Kennedy_21_23", "sentence_normalized": "After admitting that he had no experience trying a jury trial, civil trial, criminal trial, bench trial or state or federal court trial, Petersen revealed a stunning display of ignorance over fundamental legal facts.", "targets": [{"Input.gid": "allsides_194_79_4_Petersen_137_146", "from": 137, "to": 145, "mention": "Petersen", "polarity": 2.0}, {"Input.gid": "allsides_194_79_4_John Kennedy_21_23", "from": 21, "to": 23, "mention": "he", "polarity": 2.0}]}
{"primary_gid": "allsides_1950_791_19_when bereaved Benghazi mother Patricia Smith_86_100", "sentence_normalized": "But Clinton — whose negligence contributed to Sean Smith’s death — essentially called Patricia Smith a liar on national TV, and few in the media objected.", "targets": [{"Input.gid": "allsides_1950_791_19_when bereaved Benghazi mother Patricia Smith_86_100", "from": 86, "to": 100, "mention": "Patricia Smith", "polarity": 2.0}, {"Input.gid": "allsides_1950_791_19_Hillary Clinton_4_11", "from": 4, "to": 11, "mention": "Clinton", "polarity": 2.0}]}
{"primary_gid": "allsides_1950_791_4_Hillary Clinton_79_86", "sentence_normalized": "In an interview with Maureen Down of the New York Times, and again with former Clinton adviser George Stephanopoulos of ABC News, Trump was asked to respond to the speech, which Khan’s father gave while his mother stood silently.", "targets": [{"Input.gid": "allsides_1950_791_4_Stephanopoulos_102_116", "from": 102, "to": 116, "mention": "Stephanopoulos", "polarity": 4.0}, {"Input.gid": "allsides_1950_791_4_Hillary Clinton_79_86", "from": 79, "to": 86, "mention": "Clinton", "polarity": 4.0}]}
{"primary_gid": "allsides_1969_800_3_Wasserman Schultz_0_3", "sentence_normalized": "She said her first priority is serving the people of her Florida congressional district while stressing the importance of helping elect Hillary Clinton, adding: \"Going forward, the best way for me to accomplish those goals is to step down as Party Chair at the end of this convention.\"", "targets": [{"Input.gid": "allsides_1969_800_3_helping elect Hillary Clinton_122_151", "from": 122, "to": 151, "mention": "helping elect Hillary Clinton", "polarity": 6.0}, {"Input.gid": "allsides_1969_800_3_Wasserman Schultz_0_3", "from": 0, "to": 3, "mention": "She", "polarity": 6.0, "further_mentions": [{"from": 9, "to": 12, "mention": "her"}, {"from": 53, "to": 56, "mention": "her"}]}]}
{"primary_gid": "allsides_1972_801_7_Sanders_355_362", "sentence_normalized": "“That is why, many, many months ago, I made it clear that I thought Debbie Wasserman Schultz should resign, should step down, not only because of the prejudice I think they showed during the campaign, but also because I think we need a new leadership in the Democratic Party, which is going to open up that party to working people, to young people,” said Sanders, who has endorsed Clinton but has not officially suspended his campaign.", "targets": [{"Input.gid": "allsides_1972_801_7_Debbie Wasserman Schultz (Fla.) to resign_68_92", "from": 68, "to": 92, "mention": "Debbie Wasserman Schultz", "polarity": 2.0}, {"Input.gid": "allsides_1972_801_7_Sanders_355_362", "from": 355, "to": 362, "mention": "Sanders", "polarity": 6.0}, {"Input.gid": "allsides_1972_801_7_Hillary Clinton_381_388", "from": 381, "to": 388, "mention": "Clinton", "polarity": 4.0, "further_mentions": [{"from": 422, "to": 425, "mention": "his"}]}]}
{"primary_gid": "allsides_1973_802_36_Clinton_24_39", "sentence_normalized": "“It’s only fitting that Hillary Clinton would select an ethically challenged insider like Tim Kaine who’s personally benefited from the rigged system,” said Jason Miller, a spokesman for Mr. Trump.", "targets": [{"Input.gid": "allsides_1973_802_36_Mr. Kaine_90_99", "from": 90, "to": 99, "mention": "Tim Kaine", "polarity": 2.0}, {"Input.gid": "allsides_1973_802_36_Clinton_24_39", "from": 24, "to": 39, "mention": "Hillary Clinton", "polarity": 2.0}]}
{"primary_gid": "allsides_1977_804_10_Cruz_149_153", "sentence_normalized": "Fifty-nine percent of Republicans picked Trump’s acceptance speech as the “defining moment” of the convention, far more than the 28 percent who said Cruz’s televised snub defined the week.", "targets": [{"Input.gid": "allsides_1977_804_10_Trump_41_46", "from": 41, "to": 46, "mention": "Trump", "polarity": 6.0}, {"Input.gid": "allsides_1977_804_10_Cruz_149_153", "from": 149, "to": 153, "mention": "Cruz", "polarity": 2.0}]}
{"primary_gid": "allsides_1977_804_9_Trump_30_35", "sentence_normalized": "For many of the GOP insiders, Trump’s acceptance speech Thursday night helped overcome other, rockier moments this week, including Ted Cruz’s speech, in which the Texas senator declined to endorse Trump, despite angry protestations from the crowd at Quicken Loans Arena.", "targets": [{"Input.gid": "allsides_1977_804_9_Trump_30_35", "from": 30, "to": 35, "mention": "Trump", "polarity": 6.0}, {"Input.gid": "allsides_1977_804_9_Cruz_135_139", "from": 135, "to": 139, "mention": "Cruz", "polarity": 2.0, "further_mentions": [{"from": 131, "to": 139, "mention": "Ted Cruz"}]}]}
{"primary_gid": "allsides_1988_808_37_Mrs. Obama_63_68", "sentence_normalized": "Stephanie Cutter, a Democratic strategist who has also been an Obama adviser, argued that the controversy revealed an inability among people closest to Mr. Trump to talk about his character.", "targets": [{"Input.gid": "allsides_1988_808_37_Ms. Trump — who told NBC News earlier on Monday that she had written her speech herself —_152_161", "from": 152, "to": 161, "mention": "Mr. Trump", "polarity": 2.0, "further_mentions": [{"from": 176, "to": 179, "mention": "his"}]}, {"Input.gid": "allsides_1988_808_37_Mrs. Obama_63_68", "from": 63, "to": 68, "mention": "Obama", "polarity": 4.0}]}
{"primary_gid": "allsides_1988_808_46_Mrs. Obama_0_9", "sentence_normalized": "Mr. Obama, then a senator, said that he should have credited Mr. Patrick but that he did not consider it a case of plagiarism.", "targets": [{"Input.gid": "allsides_1988_808_46_Deval Patrick_61_72", "from": 61, "to": 72, "mention": "Mr. Patrick", "polarity": 6.0}, {"Input.gid": "allsides_1988_808_46_Mrs. Obama_0_9", "from": 0, "to": 9, "mention": "Mr. Obama", "polarity": 2.0, "further_mentions": [{"from": 4, "to": 9, "mention": "Obama"}]}]}
{"primary_gid": "allsides_1998_814_0_Donald Trump_11_16", "sentence_normalized": "CONFIRMED: Trump/Pence 2016", "targets": [{"Input.gid": "allsides_1998_814_0_Mike Pence_17_22", "from": 17, "to": 22, "mention": "Pence", "polarity": 4.0}, {"Input.gid": "allsides_1998_814_0_Donald Trump_11_16", "from": 11, "to": 16, "mention": "Trump", "polarity": 4.0}]}
{"primary_gid": "allsides_1999_814_27_Mike Pence_37_42", "sentence_normalized": "So, if Mr. Trump is comfortable with Pence, sounds like a good deal.”", "targets": [{"Input.gid": "allsides_1999_814_27_Mike Pence_37_42", "from": 37, "to": 42, "mention": "Pence", "polarity": 6.0}, {"Input.gid": "allsides_1999_814_27_Donald Trump_11_16", "from": 11, "to": 16, "mention": "Trump", "polarity": 6.0}]}
{"primary_gid": "allsides_1999_814_29_Mike Pence_48_53", "sentence_normalized": "Trump added that he was impressed with the way Pence has run Indiana, and that picking him would lock down the state’s electoral votes.", "targets": [{"Input.gid": "allsides_1999_814_29_Mike Pence_48_53", "from": 47, "to": 52, "mention": "Pence", "polarity": 6.0}, {"Input.gid": "allsides_1999_814_29_Donald Trump_1_6", "from": 0, "to": 5, "mention": "Trump", "polarity": 4.0}]}
{"primary_gid": "allsides_1999_814_33_Mike Pence_68_73", "sentence_normalized": "Trump picking Mike Pence would be hilarious considering how quickly Pence caved to gay activists 2yrs ago. By signing on with the Trump campaign, Pence would disqualify himself from running for re-election as governor.", "targets": [{"Input.gid": "allsides_1999_814_33_Donald Trump_0_5", "from": 0, "to": 5, "mention": "Trump", "polarity": 2.0}, {"Input.gid": "allsides_1999_814_33_Mike Pence_68_73", "from": 68, "to": 73, "mention": "Pence", "polarity": 2.0, "further_mentions": [{"from": 146, "to": 151, "mention": "Pence"}]}]}
{"primary_gid": "allsides_2003_816_5_Donald Trump_49_58", "sentence_normalized": "On Monday Justice Ginsburg doubled down, calling Mr. Trump “a faker,” who “has no consistency about him.”", "targets": [{"Input.gid": "allsides_2003_816_5_Justice Ruth Bader Ginsburg_3_26", "from": 3, "to": 26, "mention": "Monday Justice Ginsburg", "polarity": 4.0}, {"Input.gid": "allsides_2003_816_5_Donald Trump_49_58", "from": 49, "to": 58, "mention": "Mr. Trump", "polarity": 2.0, "further_mentions": [{"from": 100, "to": 103, "mention": "him"}]}]}
{"primary_gid": "allsides_2017_821_0_presumptive Democratic nominee Hillary Clinton_20_35", "sentence_normalized": "Paul Ryan Asks That Hillary Clinton Not Receive Classified Information as Candidate", "targets": [{"Input.gid": "allsides_2017_821_0_presumptive Democratic nominee Hillary Clinton_20_35", "from": 20, "to": 35, "mention": "Hillary Clinton", "polarity": 2.0, "further_mentions": [{"from": 28, "to": 35, "mention": "Clinton"}]}, {"Input.gid": "allsides_2017_821_0_Paul Ryan_0_9", "from": 0, "to": 9, "mention": "Paul Ryan", "polarity": 4.0}]}
{"primary_gid": "allsides_2032_828_27_former attorney general Janet Reno_47_50", "sentence_normalized": "See the most-read stories this hour >> Despite her assurances, Lynch was blasted by Republicans, who said it raised questions about her fairness in overseeing the probe.", "targets": [{"Input.gid": "allsides_2032_828_27_Gen. Lynch_63_68", "from": 63, "to": 68, "mention": "Lynch", "polarity": 2.0}, {"Input.gid": "allsides_2032_828_27_former attorney general Janet Reno_47_50", "from": 47, "to": 50, "mention": "her", "polarity": 2.0, "further_mentions": [{"from": 132, "to": 135, "mention": "her"}]}]}
{"primary_gid": "allsides_2067_841_159_Elizabeth Warren_53_56", "sentence_normalized": "“Secretary Clinton and the country would do well by him,” Warner said.", "targets": [{"Input.gid": "allsides_2067_841_159_Elizabeth Warren_53_56", "from": 52, "to": 55, "mention": "him", "polarity": 6.0}, {"Input.gid": "allsides_2067_841_159_Mark Warner_59_65", "from": 58, "to": 64, "mention": "Warner", "polarity": 4.0, "further_mentions": [{"from": 58, "to": 64, "mention": "Warner"}]}]}
{"primary_gid": "allsides_2069_842_5_Corey Lewandowski_29_40", "sentence_normalized": "Reached by the AP on Monday, Lewandowski deflected criticism of his approach, pointing instead to campaign chairman Paul Manafort.", "targets": [{"Input.gid": "allsides_2069_842_5_Corey Lewandowski_29_40", "from": 29, "to": 40, "mention": "Lewandowski", "polarity": 2.0, "further_mentions": [{"from": 64, "to": 67, "mention": "his"}]}, {"Input.gid": "allsides_2069_842_5_Lewandowski_29_40", "from": 29, "to": 40, "mention": "Lewandowski", "polarity": 2.0}]}
{"primary_gid": "allsides_2085_848_3_Mateen_117_123", "sentence_normalized": "A federal law enforcement source told FoxNews.com Tuesday that prosecutors have convened a grand jury to investigate Mateen's wife, Noor Salman, who could be charged as an accessory.", "targets": [{"Input.gid": "allsides_2085_848_3_Mateen_117_123", "from": 117, "to": 123, "mention": "Mateen", "polarity": 2.0}, {"Input.gid": "allsides_2085_848_3_Noor Salman_132_143", "from": 132, "to": 143, "mention": "Noor Salman", "polarity": 2.0, "further_mentions": [{"from": 137, "to": 143, "mention": "Salman"}]}]}
{"primary_gid": "allsides_2102_855_7_Elizabeth Warren_55_61", "sentence_normalized": "Speaking to MSNBC’s Rachel Maddow on Thursday evening, Warren said the Sanders campaign had been “powerfully important”.", "targets": [{"Input.gid": "allsides_2102_855_7_Rachel Maddow_20_33", "from": 20, "to": 33, "mention": "Rachel Maddow", "polarity": 4.0}, {"Input.gid": "allsides_2102_855_7_Elizabeth Warren_55_61", "from": 55, "to": 61, "mention": "Warren", "polarity": 6.0}]}
{"primary_gid": "allsides_2105_856_1_Sanders_273_280", "sentence_normalized": "President Obama formally endorsed Hillary Clinton to succeed him in the White House Thursday, saying she has the \"courage\" for the job and vowing to hit the campaign trail for her soon -- in a video message posted just moments after meeting with her primary rival Bernie Sanders.", "targets": [{"Input.gid": "allsides_2105_856_1_Sanders_273_280", "from": 271, "to": 278, "mention": "Sanders", "polarity": 4.0}, {"Input.gid": "allsides_2105_856_1_Debbie Wasserman Schultz_36_43", "from": 34, "to": 41, "mention": "Hillary", "polarity": 6.0}]}
{"primary_gid": "allsides_2110_858_38_Clinton_148_163", "sentence_normalized": "\"After Tuesday, there needs to be an understanding that Sanders goes to the convention with major clout and becomes a major Democratic player — but Hillary Clinton becomes the nominee and gets his support,\" Richardson said.", "targets": [{"Input.gid": "allsides_2110_858_38_A grim-faced Sanders_56_63", "from": 56, "to": 63, "mention": "Sanders", "polarity": 6.0}, {"Input.gid": "allsides_2110_858_38_Clinton_148_163", "from": 148, "to": 163, "mention": "Hillary Clinton", "polarity": 6.0, "further_mentions": [{"from": 156, "to": 163, "mention": "Clinton"}]}]}
{"primary_gid": "allsides_2118_862_1_Liston_48_54", "sentence_normalized": "Whether it was in the ring in his fights with Liston and Foreman, or in his defiance of the Vietnam draft and his public battle with Parkinson’s, Ali was the bravest of men Sun 5 Jun 2016 19.19 BST Last modified on Tue 28 Nov 2017 20.12 GMT The tributes paid since his death was announced on Saturday have confirmed that for more than half a century Muhammad Ali was many things to many people in many lands.", "targets": [{"Input.gid": "allsides_2118_862_1_Liston_48_54", "from": 46, "to": 52, "mention": "Liston", "polarity": 4.0}, {"Input.gid": "allsides_2118_862_1_Muhammad Ali: a life of bravery_148_151", "from": 146, "to": 149, "mention": "Ali", "polarity": 6.0, "further_mentions": [{"from": 30, "to": 33, "mention": "his"}, {"from": 110, "to": 113, "mention": "his"}, {"from": 72, "to": 75, "mention": "his"}, {"from": 350, "to": 362, "mention": "Muhammad Ali"}, {"from": 265, "to": 268, "mention": "his"}]}]}
{"primary_gid": "allsides_2132_868_7_Clinton_86_101", "sentence_normalized": "Suggesting the Clintons show a pattern of avoiding oversight, Krongard indicated that Hillary Clinton benefited from the fact there was no IG during her term.", "targets": [{"Input.gid": "allsides_2132_868_7_Clinton_86_101", "from": 86, "to": 101, "mention": "Hillary Clinton", "polarity": 2.0, "further_mentions": [{"from": 149, "to": 152, "mention": "her"}]}, {"Input.gid": "allsides_2132_868_7_Krongard_62_70", "from": 62, "to": 70, "mention": "Krongard", "polarity": 4.0}]}
{"primary_gid": "allsides_2136_870_15_Wasserman Schultz_13_30", "sentence_normalized": "Sanders says Wasserman Schultz limited the number of primary debates to protect Clinton.", "targets": [{"Input.gid": "allsides_2136_870_15_Wasserman Schultz_13_30", "from": 13, "to": 30, "mention": "Wasserman Schultz", "polarity": 2.0}, {"Input.gid": "allsides_2136_870_15_Democratic presidential front-runner Hillary Clinton_80_87", "from": 80, "to": 87, "mention": "Clinton", "polarity": 2.0}]}
{"primary_gid": "allsides_2136_870_6_Barney Frank_75_80", "sentence_normalized": "The Democratic National Committee on Saturday rejected the request, saying Frank and Malloy were elected under party rules and that Sanders wasn't alleging any violations of that process.", "targets": [{"Input.gid": "allsides_2136_870_6_Barney Frank_75_80", "from": 75, "to": 80, "mention": "Frank", "polarity": 4.0}, {"Input.gid": "allsides_2136_870_6_Sanders_132_139", "from": 132, "to": 139, "mention": "Sanders", "polarity": 4.0}]}
{"primary_gid": "allsides_2150_875_1_Donald Trump v_308_320", "sentence_normalized": "Trump reiterates willingness to debate Sanders for charity to the tune of $10m, but an aide clarified that the former reality TV star was joking Sabrina Siddiqui in Washington Thu 26 May 2016 17.58 BST Last modified on Fri 14 Jul 2017 20.21 BST Confusion reigned on Thursday over a possible debate between Donald Trump and Bernie Sanders.", "targets": [{"Input.gid": "allsides_2150_875_1_Bernie Sanders_41_48", "from": 39, "to": 46, "mention": "Sanders", "polarity": 4.0, "further_mentions": [{"from": 323, "to": 337, "mention": "Bernie Sanders"}]}, {"Input.gid": "allsides_2150_875_1_Donald Trump v_308_320", "from": 306, "to": 318, "mention": "Donald Trump", "polarity": 4.0}]}
{"primary_gid": "allsides_2160_879_28_Facebook CEO Mark Zuckerberg_0_11", "sentence_normalized": "The company’s letter Monday to Mr. Thune also gave more detail about its operations.", "targets": [{"Input.gid": "allsides_2160_879_28_Mr. Thune_31_40", "from": 31, "to": 40, "mention": "Mr. Thune", "polarity": 4.0}, {"Input.gid": "allsides_2160_879_28_Facebook CEO Mark Zuckerberg_0_11", "from": 0, "to": 11, "mention": "The company", "polarity": 4.0, "further_mentions": [{"from": 69, "to": 72, "mention": "its"}]}]}
{"primary_gid": "allsides_2161_879_18_Facebook CEO Mark Zuckerberg_113_123", "sentence_normalized": "Arthur Brooks, president of the conservative think tank the American Enterprise Institute, said the meeting with Zuckerberg was \"productive\" and focused on potential solutions to avoid conscious and \"subconscious\" censorship in the future.", "targets": [{"Input.gid": "allsides_2161_879_18_\" Brooks_0_89", "from": 0, "to": 89, "mention": "Arthur Brooks, president of the conservative think tank the American Enterprise Institute", "polarity": 6.0}, {"Input.gid": "allsides_2161_879_18_Facebook CEO Mark Zuckerberg_113_123", "from": 113, "to": 123, "mention": "Zuckerberg", "polarity": 6.0}]}
{"primary_gid": "allsides_2182_887_2_Clinton_20_27", "sentence_normalized": "Sanders easily beat Clinton in the Oregon Democratic primary, and was running neck-and-neck with her in Kentucky, though Clinton claimed victory with less than 2,000 votes separating them and not all precincts counted.", "targets": [{"Input.gid": "allsides_2182_887_2_Sanders_0_7", "from": 0, "to": 7, "mention": "Sanders", "polarity": 6.0}, {"Input.gid": "allsides_2182_887_2_Clinton_20_27", "from": 20, "to": 27, "mention": "Clinton", "polarity": 2.0, "further_mentions": [{"from": 121, "to": 128, "mention": "Clinton"}, {"from": 97, "to": 100, "mention": "her"}]}]}
{"primary_gid": "allsides_2185_888_19_Clinton_6_13", "sentence_normalized": "While Clinton has a strong lead in the delegate race, Sanders is showing no signs of backing down or laying off the attacks that Trump has already said will be a playbook for his own battle against Clinton.", "targets": [{"Input.gid": "allsides_2185_888_19_Sanders_54_61", "from": 54, "to": 61, "mention": "Sanders", "polarity": 6.0, "further_mentions": [{"from": 175, "to": 178, "mention": "his"}]}, {"Input.gid": "allsides_2185_888_19_Clinton_6_13", "from": 6, "to": 13, "mention": "Clinton", "polarity": 6.0}]}
{"primary_gid": "allsides_2238_910_35_Ted Cruz_18_22", "sentence_normalized": "As the reality of Cruz's downfall and Trump's presumptive nomination begins to sink in, the Republican party faces a serious dilemma: whether to support Trump as the party's nominee and potentially hand Democratic front-runner Hillary Clinton the presidency, or risk further damage to the party with Trump at the helm.", "targets": [{"Input.gid": "allsides_2238_910_35_Donald Trump's_38_43", "from": 38, "to": 43, "mention": "Trump", "polarity": 2.0}, {"Input.gid": "allsides_2238_910_35_Ted Cruz_18_22", "from": 18, "to": 22, "mention": "Cruz", "polarity": 2.0}]}
{"primary_gid": "allsides_2239_911_3_Ted Cruz (Texas)_55_59", "sentence_normalized": "“You are the problem,” a man holding a Trump sign told Cruz.", "targets": [{"Input.gid": "allsides_2239_911_3_Ted Cruz (Texas)_55_59", "from": 55, "to": 59, "mention": "Cruz", "polarity": 2.0}, {"Input.gid": "allsides_2239_911_3_his rival Donald Trump_39_44", "from": 39, "to": 44, "mention": "Trump", "polarity": 4.0}]}
{"primary_gid": "allsides_2239_911_9_Ted Cruz (Texas)_33_37", "sentence_normalized": "“Donald Trump is deceiving you,” Cruz said.", "targets": [{"Input.gid": "allsides_2239_911_9_Ted Cruz (Texas)_33_37", "from": 33, "to": 37, "mention": "Cruz", "polarity": 4.0}, {"Input.gid": "allsides_2239_911_9_his rival Donald Trump_1_13", "from": 1, "to": 13, "mention": "Donald Trump", "polarity": 2.0}]}
{"primary_gid": "allsides_2240_911_26_Donald Trump_92_104", "sentence_normalized": "Cruz shot back: \"It's interesting that you added women and children because your candidate, Donald Trump, came out and said he would order our military to kill the women and children, the wives and children, of terrorists, which is a war crime.\"", "targets": [{"Input.gid": "allsides_2240_911_26_Donald Trump_92_104", "from": 92, "to": 104, "mention": "Donald Trump", "polarity": 2.0, "further_mentions": [{"from": 99, "to": 104, "mention": "Trump"}]}, {"Input.gid": "allsides_2240_911_26_Cruz_0_4", "from": 0, "to": 4, "mention": "Cruz", "polarity": 4.0}]}
{"primary_gid": "allsides_2243_912_19_Clinton_78_85", "sentence_normalized": "Sanders was making stops in Kentucky, which holds a primary in mid-May, while Clinton moved on to Ohio, a key general election battleground.", "targets": [{"Input.gid": "allsides_2243_912_19_Bernie Sanders_0_7", "from": 0, "to": 7, "mention": "Sanders", "polarity": 4.0}, {"Input.gid": "allsides_2243_912_19_Clinton_78_85", "from": 78, "to": 85, "mention": "Clinton", "polarity": 4.0}]}
{"primary_gid": "allsides_2255_917_7_Ted Cruz For President_7_9", "sentence_normalized": "Before he announced the endorsement, Pence went out of his way to praise Trump, whom he said has \"given voice\" to the frustrations of Americans.", "targets": [{"Input.gid": "allsides_2255_917_7_Donald Trump_73_78", "from": 73, "to": 78, "mention": "Trump", "polarity": 6.0}, {"Input.gid": "allsides_2255_917_7_Ted Cruz For President_7_9", "from": 7, "to": 9, "mention": "he", "polarity": 6.0, "further_mentions": [{"from": 55, "to": 58, "mention": "his"}, {"from": 85, "to": 87, "mention": "he"}]}]}
{"primary_gid": "allsides_2256_917_16_Cruz_48_51", "sentence_normalized": "Pence, though, made sure to praise Trump during his remarks Friday.", "targets": [{"Input.gid": "allsides_2256_917_16_Cruz_48_51", "from": 48, "to": 51, "mention": "his", "polarity": 6.0}, {"Input.gid": "allsides_2256_917_16_Pence_0_5", "from": 0, "to": 5, "mention": "Pence", "polarity": 4.0}]}
{"primary_gid": "allsides_225_91_3_former police officer Michael Slager of second-degree murder_23_29", "sentence_normalized": "The ruling comes after Slager changed his story of the shooting a number of times.", "targets": [{"Input.gid": "allsides_225_91_3_former police officer Michael Slager of second-degree murder_23_29", "from": 23, "to": 29, "mention": "Slager", "polarity": 2.0}, {"Input.gid": "allsides_225_91_3_Scott_38_41", "from": 38, "to": 41, "mention": "his", "polarity": 2.0}]}
{"primary_gid": "allsides_2273_923_34_Corey Lewandowski_60_62", "sentence_normalized": "That was apparent in Trump’s election night speech in which he jabbed at Clinton, Cruz and Kasich and wandered far off script, just as he has throughout the campaign.", "targets": [{"Input.gid": "allsides_2273_923_34_Cruz_82_86", "from": 82, "to": 86, "mention": "Cruz", "polarity": 4.0}, {"Input.gid": "allsides_2273_923_34_Corey Lewandowski_60_62", "from": 60, "to": 62, "mention": "he", "polarity": 2.0, "further_mentions": [{"from": 135, "to": 137, "mention": "he"}]}]}
{"primary_gid": "allsides_2278_926_29_Kasich_14_20", "sentence_normalized": "Both Cruz and Kasich had cast the state as a critical turning point.", "targets": [{"Input.gid": "allsides_2278_926_29_Cruz_5_9", "from": 5, "to": 9, "mention": "Cruz", "polarity": 4.0}, {"Input.gid": "allsides_2278_926_29_Kasich_14_20", "from": 14, "to": 20, "mention": "Kasich", "polarity": 4.0}]}
{"primary_gid": "allsides_2279_926_0_Donald Trump_50_62", "sentence_normalized": "The problem with Cruz and Kasich aligning to stop Donald Trump", "targets": [{"Input.gid": "allsides_2279_926_0_Cruz_17_21", "from": 17, "to": 21, "mention": "Cruz", "polarity": 2.0}, {"Input.gid": "allsides_2279_926_0_Kasich_26_32", "from": 26, "to": 32, "mention": "Kasich", "polarity": 2.0}, {"Input.gid": "allsides_2279_926_0_Donald Trump_50_62", "from": 50, "to": 62, "mention": "Donald Trump", "polarity": 2.0}]}
{"primary_gid": "allsides_2306_938_8_Democratic presidential candidate Bernie Sanders_69_76", "sentence_normalized": "Head of the academy, Bishop Marcelo Sanchez Sorondo, said he invited Sanders to speak because he was the only American presidential candidate who has expressed serious interest in the teachings of Pope Francis, RNS reported.", "targets": [{"Input.gid": "allsides_2306_938_8_Democratic presidential candidate Bernie Sanders_69_76", "from": 69, "to": 76, "mention": "Sanders", "polarity": 6.0}, {"Input.gid": "allsides_2306_938_8_Pope Francis_197_209", "from": 197, "to": 209, "mention": "Pope Francis", "polarity": 6.0}]}
{"primary_gid": "allsides_2314_941_2_Palm Beach County State Attorney David Aronberg_114_161", "sentence_normalized": "The decision not to press charges against Corey Lewandowski is scheduled to be announced on Thursday afternoon by Palm Beach County State Attorney David Aronberg.", "targets": [{"Input.gid": "allsides_2314_941_2_Palm Beach County State Attorney David Aronberg_114_161", "from": 114, "to": 161, "mention": "Palm Beach County State Attorney David Aronberg", "polarity": 4.0}, {"Input.gid": "allsides_2314_941_2_Corey Lewandowski_42_59", "from": 42, "to": 59, "mention": "Corey Lewandowski", "polarity": 2.0}]}
{"primary_gid": "allsides_2316_942_9_GOP presidential front-runner Donald Trump_65_72", "sentence_normalized": "He should be ashamed of himself because he knows what's going on,\" Trump said.", "targets": [{"Input.gid": "allsides_2316_942_9_Reince Priebus_0_2", "from": 0, "to": 2, "mention": "He", "polarity": 2.0, "further_mentions": [{"from": 40, "to": 42, "mention": "he"}, {"from": 24, "to": 31, "mention": "himself"}]}, {"Input.gid": "allsides_2316_942_9_GOP presidential front-runner Donald Trump_65_72", "from": 65, "to": 72, "mention": "\" Trump", "polarity": 4.0, "further_mentions": [{"from": 67, "to": 72, "mention": "Trump"}]}]}
{"primary_gid": "allsides_2320_943_2_Ted Cruz_0_8", "sentence_normalized": "Ted Cruz (R-TX) told a local radio show in California on Monday morning that the Drudge Report, the most popular conservative news website, has “become the attack site for the Donald Trump campaign.”", "targets": [{"Input.gid": "allsides_2320_943_2_Ted Cruz_0_8", "from": 0, "to": 8, "mention": "Ted Cruz", "polarity": 4.0, "further_mentions": [{"from": 0, "to": 15, "mention": "Ted Cruz (R-TX)"}]}, {"Input.gid": "allsides_2320_943_2_Donald Trump_176_188", "from": 176, "to": 188, "mention": "Donald Trump", "polarity": 4.0}]}
{"primary_gid": "allsides_2320_943_6_Ted Cruz_0_4", "sentence_normalized": "Cruz responded: > Look, Drudge Report over the years has done a good job highlighting the excesses of the left and the excesses of liberalism, and about the past month the Drudge Report has basically become the attack site for the Donald Trump campaign.", "targets": [{"Input.gid": "allsides_2320_943_6_Ted Cruz_0_4", "from": 0, "to": 4, "mention": "Cruz", "polarity": 4.0}, {"Input.gid": "allsides_2320_943_6_Donald Trump_231_243", "from": 231, "to": 243, "mention": "Donald Trump", "polarity": 2.0, "further_mentions": [{"from": 238, "to": 243, "mention": "Trump"}]}]}
{"primary_gid": "allsides_2325_945_9_Cruz_6_10", "sentence_normalized": "While Cruz’s campaign spent months recruiting slates of delegates and securing pledges, Trump only this week hired a Colorado state director.", "targets": [{"Input.gid": "allsides_2325_945_9_Cruz_6_10", "from": 6, "to": 10, "mention": "Cruz", "polarity": 4.0}, {"Input.gid": "allsides_2325_945_9_front-runner Donald Trump_88_93", "from": 88, "to": 93, "mention": "Trump", "polarity": 2.0}]}
{"primary_gid": "allsides_2335_949_28_Cruz_47_51", "sentence_normalized": "Yesterday in New York, for instance, he called Cruz “a smear artist.”", "targets": [{"Input.gid": "allsides_2335_949_28_John Kasich_37_39", "from": 37, "to": 39, "mention": "he", "polarity": 2.0}, {"Input.gid": "allsides_2335_949_28_Cruz_47_51", "from": 47, "to": 51, "mention": "Cruz", "polarity": 2.0}]}
{"primary_gid": "allsides_2339_950_15_Clinton_10_17", "sentence_normalized": "Ted Cruz, Clinton also made clear Sunday that Sanders remains a political threat.", "targets": [{"Input.gid": "allsides_2339_950_15_Ted Cruz_0_8", "from": 0, "to": 8, "mention": "Ted Cruz", "polarity": 4.0}, {"Input.gid": "allsides_2339_950_15_Sanders_46_53", "from": 46, "to": 53, "mention": "Sanders", "polarity": 6.0}, {"Input.gid": "allsides_2339_950_15_Clinton_10_17", "from": 10, "to": 17, "mention": "Clinton", "polarity": 4.0}]}
{"primary_gid": "allsides_2339_950_3_Clinton_94_101", "sentence_normalized": "Sanders, a Brooklynite who has won five of the last six primaries or caucuses, has challenged Clinton to a debate in delegate-rich New York.", "targets": [{"Input.gid": "allsides_2339_950_3_Sanders_0_7", "from": 0, "to": 7, "mention": "Sanders", "polarity": 6.0}, {"Input.gid": "allsides_2339_950_3_Clinton_94_101", "from": 94, "to": 101, "mention": "Clinton", "polarity": 4.0}]}
{"primary_gid": "allsides_2350_954_21_\\--Ted Cruz_11_15", "sentence_normalized": "He accuses Cruz of first being obsequious toward Trump, but turning to self-righteousness now that “the name-calling and scandal-mongering have been turned against his reputation and his family.”", "targets": [{"Input.gid": "allsides_2350_954_21_Donald Trump_49_54", "from": 49, "to": 54, "mention": "Trump", "polarity": 2.0}, {"Input.gid": "allsides_2350_954_21_\\--Ted Cruz_11_15", "from": 11, "to": 15, "mention": "Cruz", "polarity": 2.0}]}
{"primary_gid": "allsides_2359_957_4_Cruz_23_27", "sentence_normalized": "He said he's endorsing Cruz because Walker said he's a constitutional conservative, he's not afraid to take on special interests and then for one practical reason.", "targets": [{"Input.gid": "allsides_2359_957_4_Scott Walker_36_42", "from": 36, "to": 42, "mention": "Walker", "polarity": 4.0}, {"Input.gid": "allsides_2359_957_4_Cruz_23_27", "from": 23, "to": 27, "mention": "Cruz", "polarity": 6.0}]}
{"primary_gid": "allsides_2378_965_14_Belgian Prime Minister Charles Michel_0_37", "sentence_normalized": "Belgian Prime Minister Charles Michel said there was no immediate evidence linking key Paris suspect Salah Abdeslam to them.", "targets": [{"Input.gid": "allsides_2378_965_14_Belgian Prime Minister Charles Michel_0_37", "from": 0, "to": 37, "mention": "Belgian Prime Minister Charles Michel", "polarity": 4.0}, {"Input.gid": "allsides_2378_965_14_Salah Abdeslam_101_115", "from": 101, "to": 115, "mention": "Salah Abdeslam", "polarity": 2.0}]}
{"primary_gid": "allsides_2407_976_113_Clinton_169_176", "sentence_normalized": "The Charlotte Observer notes that three presidential candidates descended on the city Monday: Sanders rallied supporters at PNC Music Pavilion near UNC Charlotte, while Clinton made a late-night appearance at Grady Cole Center just outside uptown.", "targets": [{"Input.gid": "allsides_2407_976_113_Clinton_169_176", "from": 169, "to": 176, "mention": "Clinton", "polarity": 4.0}, {"Input.gid": "allsides_2407_976_113_Sanders_94_101", "from": 94, "to": 101, "mention": "Sanders", "polarity": 6.0}]}
{"primary_gid": "allsides_2430_987_0_Clinton_0_7", "sentence_normalized": "Clinton And Sanders Show Republicans What A Real Debate Looks Like", "targets": [{"Input.gid": "allsides_2430_987_0_Sanders_12_19", "from": 12, "to": 19, "mention": "Sanders", "polarity": 6.0}, {"Input.gid": "allsides_2430_987_0_Clinton_0_7", "from": 0, "to": 7, "mention": "Clinton", "polarity": 6.0}]}
{"primary_gid": "allsides_2432_987_11_Sanders_4_11", "sentence_normalized": "But Sanders remains significantly behind in the race for delegates, with Clinton having won more – and more valuable – state contests, as well as enjoying the overwhelming support of so-called “superdelegates.”", "targets": [{"Input.gid": "allsides_2432_987_11_Sanders_4_11", "from": 4, "to": 11, "mention": "Sanders", "polarity": 2.0}, {"Input.gid": "allsides_2432_987_11_Clinton_73_80", "from": 73, "to": 80, "mention": "Clinton", "polarity": 6.0}]}
{"primary_gid": "allsides_2434_988_10_Cruz_44_48", "sentence_normalized": "Perhaps the most heartening development for Cruz, though, was in Louisiana, where results indicated that voters swung late toward him and away from Trump and Rubio.", "targets": [{"Input.gid": "allsides_2434_988_10_Donald Trump_148_153", "from": 148, "to": 153, "mention": "Trump", "polarity": 2.0}, {"Input.gid": "allsides_2434_988_10_Cruz_44_48", "from": 44, "to": 48, "mention": "Cruz", "polarity": 6.0}]}
{"primary_gid": "allsides_2434_988_13_Donald Trump_98_103", "sentence_normalized": "But as election day votes were gradually counted, Cruz's share of the vote suddenly surged, while Trump's declined and Rubio's utterly collapsed.", "targets": [{"Input.gid": "allsides_2434_988_13_Rubio_119_124", "from": 119, "to": 124, "mention": "Rubio", "polarity": 2.0}, {"Input.gid": "allsides_2434_988_13_Donald Trump_98_103", "from": 98, "to": 103, "mention": "Trump", "polarity": 2.0}, {"Input.gid": "allsides_2434_988_13_Cruz_50_54", "from": 50, "to": 54, "mention": "Cruz", "polarity": 6.0}]}
{"primary_gid": "allsides_2434_988_31_Cruz_27_31", "sentence_normalized": "But that late swing toward Cruz in Louisiana, and his surprising strength in Maine, show that Cruz shouldn't be counted out.", "targets": [{"Input.gid": "allsides_2434_988_31_Cruz_27_31", "from": 27, "to": 31, "mention": "Cruz", "polarity": 6.0, "further_mentions": [{"from": 94, "to": 98, "mention": "Cruz"}]}, {"Input.gid": "allsides_2434_988_31_Donald Trump_50_53", "from": 50, "to": 53, "mention": "his", "polarity": 6.0}]}
{"primary_gid": "allsides_2454_997_1_Donald Trump_62_74", "sentence_normalized": "Appearing this morning on Jake Tapper's State of the Union, Donald Trump was asked to disavow support from former Ku Klux Klan leader David Duke and other white supremacists and politely declined.", "targets": [{"Input.gid": "allsides_2454_997_1_Donald Trump_62_74", "from": 60, "to": 72, "mention": "Donald Trump", "polarity": 2.0}, {"Input.gid": "allsides_2454_997_1_David Duke_136_146", "from": 134, "to": 144, "mention": "David Duke", "polarity": 2.0}]}
{"primary_gid": "allsides_2462_1001_0_Donald Trump_0_12", "sentence_normalized": "Donald Trump and Mitt Romney exchange insults", "targets": [{"Input.gid": "allsides_2462_1001_0_Donald Trump_0_12", "from": 0, "to": 12, "mention": "Donald Trump", "polarity": 2.0}, {"Input.gid": "allsides_2462_1001_0_Mitt Romney_17_28", "from": 17, "to": 28, "mention": "Mitt Romney", "polarity": 2.0}]}
{"primary_gid": "allsides_2462_1001_28_@ahernandez85a Romney_0_2", "sentence_normalized": "He is jealous of Trump!\"", "targets": [{"Input.gid": "allsides_2462_1001_28_Donald Trump_17_22", "from": 17, "to": 22, "mention": "Trump", "polarity": 6.0}, {"Input.gid": "allsides_2462_1001_28_@ahernandez85a Romney_0_2", "from": 0, "to": 2, "mention": "He", "polarity": 2.0}]}
{"primary_gid": "allsides_2465_1002_16_Cruz_149_153", "sentence_normalized": "When Rubio refers to commercials making fun of his boots, or admits he “did not do well” in the debate, or contrasts himself to a petulant Trump and Cruz by saying, “Don’t worry—I’m not leaving the stage no matter what you ask me,” he’s hard to hate.", "targets": [{"Input.gid": "allsides_2465_1002_16_Cruz_149_153", "from": 149, "to": 153, "mention": "Cruz", "polarity": 2.0}, {"Input.gid": "allsides_2465_1002_16_Donald Trump_139_144", "from": 139, "to": 144, "mention": "Trump", "polarity": 2.0}]}
{"primary_gid": "allsides_2488_1013_20_Marco Rubio_7_12", "sentence_normalized": "As the Rubio-Cruz battle heated up, so did the long-simmering feud between Trump and Bush.", "targets": [{"Input.gid": "allsides_2488_1013_20_Marco Rubio_7_12", "from": 7, "to": 12, "mention": "Rubio", "polarity": 4.0}, {"Input.gid": "allsides_2488_1013_20_Bush_85_89", "from": 85, "to": 89, "mention": "Bush", "polarity": 2.0}]}
{"primary_gid": "allsides_2488_1013_30_Bush_0_4", "sentence_normalized": "Bush, though, said Russia is not a U.S. ally, and Assad’s hold on power prevents a resolution in the war.", "targets": [{"Input.gid": "allsides_2488_1013_30_Bush_0_4", "from": 0, "to": 4, "mention": "Bush", "polarity": 4.0}, {"Input.gid": "allsides_2488_1013_30_Bashar Assad_50_55", "from": 50, "to": 55, "mention": "Assad", "polarity": 2.0}]}
{"primary_gid": "allsides_2490_1014_5_President Obama_141_156", "sentence_normalized": "Several candidates - three of whom are sitting senators - sent quick condolences and had already staked their ground on the question of what President Obama and the Senate should do about Justice Scalia's replacement.", "targets": [{"Input.gid": "allsides_2490_1014_5_Supreme Court Justice Antonin Scalia_188_202", "from": 188, "to": 202, "mention": "Justice Scalia", "polarity": 4.0}, {"Input.gid": "allsides_2490_1014_5_President Obama_141_156", "from": 141, "to": 156, "mention": "President Obama", "polarity": 4.0}]}
{"primary_gid": "allsides_2510_1022_18_Marco Rubio_45_50", "sentence_normalized": "Christie has been unrelenting in questioning Rubio’s readiness and authenticity.", "targets": [{"Input.gid": "allsides_2510_1022_18_Marco Rubio_45_50", "from": 45, "to": 50, "mention": "Rubio", "polarity": 2.0}, {"Input.gid": "allsides_2510_1022_18_Christie_0_8", "from": 0, "to": 8, "mention": "Christie", "polarity": 6.0}]}
{"primary_gid": "allsides_2510_1022_4_Kasich_168_174", "sentence_normalized": "And on the Republican side, nearly a half-dozen candidates are battling for position behind Donald Trump, with the race's governors – Chris Christie, Jeb Bush and John Kasich -- looking for redemption after missing the leaderboard entirely last week.", "targets": [{"Input.gid": "allsides_2510_1022_4_Kasich_168_174", "from": 168, "to": 174, "mention": "Kasich", "polarity": 2.0}, {"Input.gid": "allsides_2510_1022_4_Christie_140_148", "from": 140, "to": 148, "mention": "Christie", "polarity": 2.0}]}
{"primary_gid": "allsides_2515_1024_10_Marco Rubio_0_5", "sentence_normalized": "Rubio responded with a shot at Christie for his reluctance to return to New Jersey for a snowstorm that then turned into a criticism of Obama, and Christie pointed out that, once again, Rubio had proved his point.", "targets": [{"Input.gid": "allsides_2515_1024_10_President Barack Obama_136_141", "from": 136, "to": 141, "mention": "Obama", "polarity": 2.0}, {"Input.gid": "allsides_2515_1024_10_Marco Rubio_0_5", "from": 0, "to": 5, "mention": "Rubio", "polarity": 4.0, "further_mentions": [{"from": 186, "to": 191, "mention": "Rubio"}, {"from": 203, "to": 206, "mention": "his"}, {"from": 44, "to": 47, "mention": "his"}]}]}
{"primary_gid": "allsides_2517_1025_53_Bernie Sanders_341_348", "sentence_normalized": "Email FoxNewsFirst@FOXNEWS.COM POLL CHECK Real Clear Politics Averages National GOP nomination: Trump 33.2 percent; Cruz 20.7 percent; Rubio 13.3 percent; Carson 7.8 percent New Hampshire GOP Primary: Trump 32.4 percent; Rubio 15 percent; Cruz 12.6 percent; Kasich 11 percent; Bush 9.8 percent National Dem nomination: Clinton 50.5 percent; Sanders 37.2 percent New Hampshire Dem Primary: Sanders 57.8; Clinton 35.5 percent General Election Clinton vs. Trump: Clinton +2.7 points Generic Congressional Vote: Republicans +0.5 DEBATE, POLL FORETELL LONG SLOG FOR HILLARY A contentious, sometimes nasty, Democratic debate between presumptive nominee Hillary Clinton and her rival, socialist Sen.", "targets": [{"Input.gid": "allsides_2517_1025_53_Bernie Sanders_341_348", "from": 341, "to": 348, "mention": "Sanders", "polarity": 4.0}, {"Input.gid": "allsides_2517_1025_53_Marco Rubio_135_140", "from": 135, "to": 140, "mention": "Rubio", "polarity": 4.0}]}
{"primary_gid": "allsides_2533_1032_28_Cruz_5_9", "sentence_normalized": "\"Ted Cruz proved he could successfully beat back Trump attacks because he had a great ground game and identified well with evangelical voters.\"", "targets": [{"Input.gid": "allsides_2533_1032_28_Cruz_5_9", "from": 5, "to": 9, "mention": "Cruz", "polarity": 6.0}, {"Input.gid": "allsides_2533_1032_28_businessman Trump_49_54", "from": 49, "to": 54, "mention": "Trump", "polarity": 2.0}]}
{"primary_gid": "allsides_2547_1037_20_Rubio_54_56", "sentence_normalized": "I don’t think it was his strongest debate and neither he nor Cruz looked good in their fight over immigration.", "targets": [{"Input.gid": "allsides_2547_1037_20_Cruz_61_65", "from": 61, "to": 65, "mention": "Cruz", "polarity": 2.0}, {"Input.gid": "allsides_2547_1037_20_Rubio_54_56", "from": 54, "to": 56, "mention": "he", "polarity": 2.0, "further_mentions": [{"from": 21, "to": 24, "mention": "his"}]}]}
{"primary_gid": "allsides_2549_1038_24_Trump_55_58", "sentence_normalized": "Mr. O’Reilly said that was the truth, and complimented him for coming on.", "targets": [{"Input.gid": "allsides_2549_1038_24_Bill O’Reilly_0_12", "from": 0, "to": 12, "mention": "Mr. O’Reilly", "polarity": 6.0}, {"Input.gid": "allsides_2549_1038_24_Trump_55_58", "from": 55, "to": 58, "mention": "him", "polarity": 6.0}]}
{"primary_gid": "allsides_2549_1038_42_Ms. Kelly_154_163", "sentence_normalized": "Mr. Ailes decided to move forward with the statement involving Mr. Putin and the ayatollah after Mr. Trump posted a video on an Instagram account calling Ms. Kelly “really biased against me,” and asking his followers, “Do you really think she can be fair at a debate?”", "targets": [{"Input.gid": "allsides_2549_1038_42_Trump_101_106", "from": 101, "to": 106, "mention": "Trump", "polarity": 2.0, "further_mentions": [{"from": 97, "to": 106, "mention": "Mr. Trump"}]}, {"Input.gid": "allsides_2549_1038_42_Ms. Kelly_154_163", "from": 154, "to": 163, "mention": "Ms. Kelly", "polarity": 2.0, "further_mentions": [{"from": 239, "to": 242, "mention": "she"}]}]}
{"primary_gid": "allsides_2551_1039_8_Megyn Kelly_122_133", "sentence_normalized": "Trump campaign manager Corey Lewandowski told MSNBC’s “Morning Joe” on Wednesday that the boycott had “nothing to do with Megyn Kelly.”", "targets": [{"Input.gid": "allsides_2551_1039_8_Trump’s campaign manager Corey Lewandowski_29_40", "from": 29, "to": 40, "mention": "Lewandowski", "polarity": 4.0}, {"Input.gid": "allsides_2551_1039_8_Megyn Kelly_122_133", "from": 122, "to": 133, "mention": "Megyn Kelly", "polarity": 4.0, "further_mentions": [{"from": 128, "to": 133, "mention": "Kelly"}]}]}
{"primary_gid": "allsides_2567_1045_97_Donald Trump_32_44", "sentence_normalized": "ERICK ERICKSON I would vote for Donald Trump over Hillary Clinton.", "targets": [{"Input.gid": "allsides_2567_1045_97_ERICK ERICKSON_0_14", "from": 0, "to": 14, "mention": "ERICK ERICKSON", "polarity": 4.0}, {"Input.gid": "allsides_2567_1045_97_Donald Trump_32_44", "from": 32, "to": 44, "mention": "Donald Trump", "polarity": 6.0, "further_mentions": [{"from": 32, "to": 65, "mention": "Donald Trump over Hillary Clinton"}]}]}
{"primary_gid": "allsides_2579_1051_31_Sanders_55_62", "sentence_normalized": "Before Sunday, Clinton and her team had suggested that Sanders was withholding his health care proposal to avoid the perception that it would raise taxes on the middle class.", "targets": [{"Input.gid": "allsides_2579_1051_31_Bernie Sanders_55_62", "from": 55, "to": 62, "mention": "Sanders", "polarity": 2.0}, {"Input.gid": "allsides_2579_1051_31_Sanders_55_62", "from": 55, "to": 62, "mention": "Sanders", "polarity": 2.0, "further_mentions": [{"from": 79, "to": 82, "mention": "his"}]}]}
{"primary_gid": "allsides_2579_1051_71_Hillary Clinton_82_104", "sentence_normalized": "Sanders wants to reinstate Glass-Steagall, the Depression-era banking legislation President Bill Clinton repealed that prevented big banks from engaging in both investment and commercial activities.", "targets": [{"Input.gid": "allsides_2579_1051_71_Bernie Sanders_0_7", "from": 0, "to": 7, "mention": "Sanders", "polarity": 6.0}, {"Input.gid": "allsides_2579_1051_71_Hillary Clinton_82_104", "from": 82, "to": 104, "mention": "President Bill Clinton", "polarity": 4.0, "further_mentions": [{"from": 92, "to": 104, "mention": "Bill Clinton"}]}]}
{"primary_gid": "allsides_2623_1069_40_the Hammonds_16_19", "sentence_normalized": "Thus, Bundy and his fellow militiamen have seized the headquarters of the Malheur National Wildlife Refuge — located in a remote area some 50 miles southeast of the city of Burns — in hopes of creating a \"base\" where \"patriots\" like themselves can come, with their guns, to live and make their stand against the \"tyrannical\" federal government.", "targets": [{"Input.gid": "allsides_2623_1069_40_Burns_173_178", "from": 173, "to": 178, "mention": "Burns", "polarity": 4.0}, {"Input.gid": "allsides_2623_1069_40_the Hammonds_16_19", "from": 16, "to": 19, "mention": "his", "polarity": 2.0}]}
{"primary_gid": "allsides_2654_1081_71_Mrs. Fidget_22_33", "sentence_normalized": "She’s the opposite of Mrs. Fidget, the motherly character in C.S. Lewis’ classic “The Four Loves.”", "targets": [{"Input.gid": "allsides_2654_1081_71_Mrs. Fidget_22_33", "from": 22, "to": 33, "mention": "Mrs. Fidget", "polarity": 4.0}, {"Input.gid": "allsides_2654_1081_71_C.S. Lewis_61_71", "from": 61, "to": 71, "mention": "C.S. Lewis", "polarity": 4.0}]}
{"primary_gid": "allsides_2666_1085_73_Sanders_127_134", "sentence_normalized": "As moderator David Muir stalled for time while delivering the next question, the cameras showed an empty center podium between Sanders and O'Malley.", "targets": [{"Input.gid": "allsides_2666_1085_73_Sanders_127_134", "from": 127, "to": 134, "mention": "Sanders", "polarity": 4.0}, {"Input.gid": "allsides_2666_1085_73_O'Malley_139_147", "from": 139, "to": 147, "mention": "O'Malley", "polarity": 4.0}]}
{"primary_gid": "allsides_2669_1086_14_Mr. Sanders‘_33_40", "sentence_normalized": "The fight comes a day before Mr. Sanders, Mrs. Clinton and former Maryland Gov.", "targets": [{"Input.gid": "allsides_2669_1086_14_Mr. Sanders‘_33_40", "from": 33, "to": 40, "mention": "Sanders", "polarity": 4.0, "further_mentions": [{"from": 29, "to": 40, "mention": "Mr. Sanders"}]}, {"Input.gid": "allsides_2669_1086_14_Clinton_47_54", "from": 47, "to": 54, "mention": "Clinton", "polarity": 4.0, "further_mentions": [{"from": 42, "to": 54, "mention": "Mrs. Clinton"}]}]}
{"primary_gid": "allsides_2669_1086_16_Bernie Sanders_79_90", "sentence_normalized": "Mrs. Clinton maintains a wide lead in national polls and is ahead in Iowa, but Mr. Sanders tops her in polling in New Hampshire.", "targets": [{"Input.gid": "allsides_2669_1086_16_Clinton_5_12", "from": 5, "to": 12, "mention": "Clinton", "polarity": 6.0, "further_mentions": [{"from": 0, "to": 12, "mention": "Mrs. Clinton"}]}, {"Input.gid": "allsides_2669_1086_16_Bernie Sanders_79_90", "from": 79, "to": 90, "mention": "Mr. Sanders", "polarity": 6.0, "further_mentions": [{"from": 83, "to": 90, "mention": "Sanders"}]}]}
{"primary_gid": "allsides_2672_1087_7_Clinton_38_45", "sentence_normalized": "A Fox News poll released Sunday shows Clinton with a 14-point lead over Sanders among likely Democratic caucusgoers in Iowa, while a poll of New Hampshire primary voters released Thursday shows the two in a statistical tie.", "targets": [{"Input.gid": "allsides_2672_1087_7_Sanders_72_79", "from": 72, "to": 79, "mention": "Sanders", "polarity": 2.0}, {"Input.gid": "allsides_2672_1087_7_Clinton_38_45", "from": 38, "to": 45, "mention": "Clinton", "polarity": 6.0}]}
{"primary_gid": "allsides_2712_1103_9_Farook_78_84", "sentence_normalized": "[‘I’ll take a bullet before you do’: Scenes from the San Bernardino shooting] Farook, who had a college degree in environmental health and a steady job as a health inspector, traveled to Saudi Arabia and Pakistan last year and returned with Malik, whom he had met online.", "targets": [{"Input.gid": "allsides_2712_1103_9_Farook_78_84", "from": 78, "to": 84, "mention": "Farook", "polarity": 4.0}, {"Input.gid": "allsides_2712_1103_9_Malik, whom he had met online_241_270", "from": 241, "to": 270, "mention": "Malik, whom he had met online", "polarity": 4.0}]}
{"primary_gid": "allsides_271_110_11_Murkowski_90_99", "sentence_normalized": "The bigger questions for GOP leaders are senators including Susan Collins (R-Maine), Lisa Murkowski (R-Alaska), John McCain (R-Ariz.) and Bob Corker (R-Tenn.).", "targets": [{"Input.gid": "allsides_271_110_11_McCain_117_123", "from": 117, "to": 123, "mention": "McCain", "polarity": 4.0}, {"Input.gid": "allsides_271_110_11_Collins_66_73", "from": 66, "to": 73, "mention": "Collins", "polarity": 4.0}, {"Input.gid": "allsides_271_110_11_Murkowski_90_99", "from": 90, "to": 99, "mention": "Murkowski", "polarity": 4.0}]}
{"primary_gid": "allsides_2730_1110_11_Tisquantum_10_20", "sentence_normalized": "Hunt took Tisquantum and around two dozen other kidnapped Wampanoag to Spain, where he tried to sell them into slavery.", "targets": [{"Input.gid": "allsides_2730_1110_11_Hunt_0_4", "from": 0, "to": 4, "mention": "Hunt", "polarity": 2.0, "further_mentions": [{"from": 84, "to": 86, "mention": "he"}]}, {"Input.gid": "allsides_2730_1110_11_Tisquantum_10_20", "from": 10, "to": 20, "mention": "Tisquantum", "polarity": 4.0}]}
{"primary_gid": "allsides_2759_1124_15_Warren_152_158", "sentence_normalized": "U.S. advisers were also positioned with Kurdish commanders, set back from the front line and behind Sinjar mountain, to remain away from the crossfire, Warren said.", "targets": [{"Input.gid": "allsides_2759_1124_15_Warren_152_158", "from": 152, "to": 158, "mention": "Warren", "polarity": 4.0}, {"Input.gid": "allsides_2759_1124_15_Sinjar_100_106", "from": 100, "to": 106, "mention": "Sinjar", "polarity": 4.0}]}
{"primary_gid": "allsides_2767_1129_4_the Dick Cheney_48_59", "sentence_normalized": "In particular, he objects to how Vice President Dick Cheney and Secretary of Defense Donald Rumsfeld reacted to 9/11.", "targets": [{"Input.gid": "allsides_2767_1129_4_Rumsfeld_92_100", "from": 92, "to": 100, "mention": "Rumsfeld", "polarity": 2.0}, {"Input.gid": "allsides_2767_1129_4_the Dick Cheney_48_59", "from": 48, "to": 59, "mention": "Dick Cheney", "polarity": 2.0, "further_mentions": [{"from": 53, "to": 59, "mention": "Cheney"}]}]}
{"primary_gid": "allsides_276_111_0_Pelosi_0_6", "sentence_normalized": "Pelosi faces backlash for questioning Conyers accusers", "targets": [{"Input.gid": "allsides_276_111_0_Conyers_38_45", "from": 38, "to": 45, "mention": "Conyers", "polarity": 4.0}, {"Input.gid": "allsides_276_111_0_Pelosi_0_6", "from": 0, "to": 6, "mention": "Pelosi", "polarity": 2.0}]}
{"primary_gid": "allsides_2778_1133_39_Mr. Assad_7_16", "sentence_normalized": "Saying Mr. Assad had become a magnet for extremists, Mr. Jubeir added, “Ultimately, Daesh will be defeated when Assad is removed.”", "targets": [{"Input.gid": "allsides_2778_1133_39_Daesh_84_89", "from": 84, "to": 89, "mention": "Daesh", "polarity": 2.0}, {"Input.gid": "allsides_2778_1133_39_Mr. Assad_7_16", "from": 7, "to": 16, "mention": "Mr. Assad", "polarity": 2.0, "further_mentions": [{"from": 112, "to": 117, "mention": "Assad"}]}]}
{"primary_gid": "allsides_2787_1137_0_Ben Carson_28_34", "sentence_normalized": "Boulder bash: Trump may rip Carson, but the pressure is on Jeb", "targets": [{"Input.gid": "allsides_2787_1137_0_Ben Carson_28_34", "from": 28, "to": 34, "mention": "Carson", "polarity": 2.0}, {"Input.gid": "allsides_2787_1137_0_Jeb_59_62", "from": 59, "to": 62, "mention": "Jeb", "polarity": 2.0}]}
{"primary_gid": "allsides_2800_1143_50_Stevens_86_93", "sentence_normalized": "“Having to stop and provide public messaging advice to your [press shop]” is not what Stevens needed, Gowdy said.", "targets": [{"Input.gid": "allsides_2800_1143_50_Stevens_86_93", "from": 86, "to": 93, "mention": "Stevens", "polarity": 4.0}, {"Input.gid": "allsides_2800_1143_50_Gowdy_102_107", "from": 102, "to": 107, "mention": "Gowdy", "polarity": 4.0}]}
{"primary_gid": "allsides_2810_1147_10_Clinton_0_12", "sentence_normalized": "Mrs. Clinton was referencing comments by House Majority Leader Kevin McCarthy and other Republicans, who have suggested the Benghazi committee is designed to drive down her poll numbers and raise more questions about her use of a private email account while secretary of state.", "targets": [{"Input.gid": "allsides_2810_1147_10_Clinton_0_12", "from": 0, "to": 12, "mention": "Mrs. Clinton", "polarity": 4.0, "further_mentions": [{"from": 217, "to": 220, "mention": "her"}, {"from": 169, "to": 172, "mention": "her"}]}, {"Input.gid": "allsides_2810_1147_10_Mr. Gowdy_258_276", "from": 258, "to": 276, "mention": "secretary of state", "polarity": 2.0}]}
{"primary_gid": "allsides_2814_1148_24_Corrado_111_118", "sentence_normalized": "As the campaign draws closer to the early 2016 primary contests, however, Trump will need to spend more money, Corrado said.", "targets": [{"Input.gid": "allsides_2814_1148_24_Mr. Trump_74_79", "from": 74, "to": 79, "mention": "Trump", "polarity": 4.0}, {"Input.gid": "allsides_2814_1148_24_Corrado_111_118", "from": 111, "to": 118, "mention": "Corrado", "polarity": 4.0}]}
{"primary_gid": "allsides_283_114_8_President Trump_0_5", "sentence_normalized": "Trump said Friday that he was naming White House Office of Management and Budget Director Mick Mulvaney to the post temporarily, but outgoing CFPB Director Richard Cordray announced he was tapping his chief of staff, Leandra English, to be his successor.", "targets": [{"Input.gid": "allsides_283_114_8_Mulvaney_95_103", "from": 95, "to": 103, "mention": "Mulvaney", "polarity": 4.0}, {"Input.gid": "allsides_283_114_8_President Trump_0_5", "from": 0, "to": 5, "mention": "Trump", "polarity": 4.0, "further_mentions": [{"from": 23, "to": 25, "mention": "he"}]}, {"Input.gid": "allsides_283_114_8_outgoing CFPB Director Richard Cordray_133_171", "from": 133, "to": 171, "mention": "outgoing CFPB Director Richard Cordray", "polarity": 4.0, "further_mentions": [{"from": 240, "to": 243, "mention": "his"}, {"from": 197, "to": 200, "mention": "his"}, {"from": 182, "to": 184, "mention": "he"}]}]}
{"primary_gid": "allsides_2863_1169_3_Bobby Jindal_104_110", "sentence_normalized": "“Here’s what I say in response to Speaker Boehner stepping down: Mitch McConnell, it is now your turn,” Jindal told receptive attendees at the conservative Values Voter Summit on Friday.", "targets": [{"Input.gid": "allsides_2863_1169_3_Senate Leader Mitch McConnell_65_80", "from": 65, "to": 80, "mention": "Mitch McConnell", "polarity": 6.0}, {"Input.gid": "allsides_2863_1169_3_Bobby Jindal_104_110", "from": 104, "to": 110, "mention": "Jindal", "polarity": 4.0}]}
{"primary_gid": "allsides_2867_1170_17_Tim Huelskamp (R-Kan.)_0_22", "sentence_normalized": "Tim Huelskamp (R-Kan.) said that Boehner had resigned because he knew that he could lose his position.", "targets": [{"Input.gid": "allsides_2867_1170_17_Tim Huelskamp (R-Kan.)_0_22", "from": 0, "to": 22, "mention": "Tim Huelskamp (R-Kan.)", "polarity": 4.0, "further_mentions": [{"from": 75, "to": 77, "mention": "he"}, {"from": 89, "to": 92, "mention": "his"}, {"from": 62, "to": 64, "mention": "he"}]}, {"Input.gid": "allsides_2867_1170_17_John Boehner_33_40", "from": 33, "to": 40, "mention": "Boehner", "polarity": 2.0}]}
{"primary_gid": "allsides_290_117_36_Democratic senator Al Franken_122_129", "sentence_normalized": "When asked why people should judge the accusations against Moore and President Trump differently than accusations against Franken and others, the White House says Moore and Trump’s denials inoculate them from condemnation or any practical consequences.", "targets": [{"Input.gid": "allsides_290_117_36_President Trump_69_84", "from": 69, "to": 84, "mention": "President Trump", "polarity": 2.0, "further_mentions": [{"from": 173, "to": 178, "mention": "Trump"}]}, {"Input.gid": "allsides_290_117_36_Moore_59_64", "from": 59, "to": 64, "mention": "Moore", "polarity": 2.0, "further_mentions": [{"from": 163, "to": 168, "mention": "Moore"}]}, {"Input.gid": "allsides_290_117_36_Democratic senator Al Franken_122_129", "from": 122, "to": 129, "mention": "Franken", "polarity": 2.0}]}
{"primary_gid": "allsides_2916_1190_9_Clinton_17_32", "sentence_normalized": "“What’s clear is Hillary Clinton regrets that she got caught and is paying a political price, not the fact her secret email server put our national security at risk,” RNC spokesman Michael Short said in a statement.", "targets": [{"Input.gid": "allsides_2916_1190_9_Clinton_17_32", "from": 17, "to": 32, "mention": "Hillary Clinton", "polarity": 2.0, "further_mentions": [{"from": 107, "to": 110, "mention": "her"}, {"from": 46, "to": 49, "mention": "she"}]}, {"Input.gid": "allsides_2916_1190_9_Michael Short_181_194", "from": 181, "to": 194, "mention": "Michael Short", "polarity": 4.0}]}
{"primary_gid": "allsides_2918_1191_26_Ms. Davis_0_9", "sentence_normalized": "Ms. Davis‘ son sat stoically as the judge questioned the clerks Thursday, some of whom were reluctant.", "targets": [{"Input.gid": "allsides_2918_1191_26_Ms. Davis_0_9", "from": 0, "to": 9, "mention": "Ms. Davis", "polarity": 4.0}, {"Input.gid": "allsides_2918_1191_26_Judge Bunning_32_41", "from": 32, "to": 41, "mention": "the judge", "polarity": 4.0}]}
{"primary_gid": "allsides_2931_1196_24_Hillary_17_24", "sentence_normalized": "Sanders trounces Hillary, 50-27%, among caucus-goers under 45.", "targets": [{"Input.gid": "allsides_2931_1196_24_Sanders_0_7", "from": 0, "to": 7, "mention": "Sanders", "polarity": 6.0}, {"Input.gid": "allsides_2931_1196_24_Hillary_17_24", "from": 17, "to": 24, "mention": "Hillary", "polarity": 2.0}]}
{"primary_gid": "allsides_2931_1196_25_Sanders_0_2", "sentence_normalized": "He leads self-described liberals by 5 points and beats Hillary by 12 points among Democrats who plan to participate in the caucuses for the first time.", "targets": [{"Input.gid": "allsides_2931_1196_25_Sanders_0_2", "from": 0, "to": 2, "mention": "He", "polarity": 6.0}, {"Input.gid": "allsides_2931_1196_25_Hillary_55_62", "from": 55, "to": 62, "mention": "Hillary", "polarity": 2.0}]}
{"primary_gid": "allsides_2946_1204_7_Biden_14_19", "sentence_normalized": "The purported Biden-Warren meeting at the Naval Observatory, the vice president’s residence, was reported first by CNN.", "targets": [{"Input.gid": "allsides_2946_1204_7_Warren_20_26", "from": 20, "to": 26, "mention": "Warren", "polarity": 4.0}, {"Input.gid": "allsides_2946_1204_7_Biden_14_19", "from": 14, "to": 19, "mention": "Biden", "polarity": 4.0}]}
{"primary_gid": "allsides_2991_1223_145_Sammon_0_6", "sentence_normalized": "Sammon is the author of At Any Cost: How Al Gore Tried to Steal the Election (Regnery Publishing, 2001).", "targets": [{"Input.gid": "allsides_2991_1223_145_Sammon_0_6", "from": 0, "to": 6, "mention": "Sammon", "polarity": 4.0}, {"Input.gid": "allsides_2991_1223_145_Al Gore_41_48", "from": 41, "to": 48, "mention": "Al Gore", "polarity": 2.0}]}
{"primary_gid": "allsides_3028_1238_40_Hillary_11_18", "sentence_normalized": "Maybe even Hillary Clinton and Jeb Bush aren’t immune from premature boredom.", "targets": [{"Input.gid": "allsides_3028_1238_40_Jeb_31_34", "from": 31, "to": 34, "mention": "Jeb", "polarity": 2.0}, {"Input.gid": "allsides_3028_1238_40_Hillary_11_18", "from": 11, "to": 18, "mention": "Hillary", "polarity": 2.0}]}
{"primary_gid": "allsides_307_123_23_Mr. Trump himself_166_171", "sentence_normalized": "Speaking with Rita Cosby on WABC Radio, Mrs. Clinton added, “Look at the contrast between Al Franken, accepting responsibility, apologizing, and Roy Moore and Donald Trump, who have done neither.”", "targets": [{"Input.gid": "allsides_307_123_23_Mr. Trump himself_166_171", "from": 166, "to": 171, "mention": "Trump", "polarity": 2.0}, {"Input.gid": "allsides_307_123_23_Roy Moore_145_154", "from": 145, "to": 154, "mention": "Roy Moore", "polarity": 2.0}]}
{"primary_gid": "allsides_3090_1266_8_Matt_175_179", "sentence_normalized": "Search teams heard what they believed to be human coughs, D’Amico said, and a Customs and Border Protection tactical team helicoptered in, approached the site and encountered Matt, D’Amico said.", "targets": [{"Input.gid": "allsides_3090_1266_8_State Police Superintendent Joseph A. D’Amico_181_188", "from": 181, "to": 188, "mention": "D’Amico", "polarity": 4.0, "further_mentions": [{"from": 58, "to": 65, "mention": "D’Amico"}]}, {"Input.gid": "allsides_3090_1266_8_Matt_175_179", "from": 175, "to": 179, "mention": "Matt", "polarity": 4.0}]}
{"primary_gid": "allsides_3154_1294_33_Merkel_35_41", "sentence_normalized": "Four years ago, when Obama brought Merkel to the White House to give her the Medal of Freedom, they spent the evening at dinner with their spouses.", "targets": [{"Input.gid": "allsides_3154_1294_33_Obama_21_26", "from": 21, "to": 26, "mention": "Obama", "polarity": 6.0}, {"Input.gid": "allsides_3154_1294_33_Merkel_35_41", "from": 35, "to": 41, "mention": "Merkel", "polarity": 6.0, "further_mentions": [{"from": 69, "to": 72, "mention": "her"}]}]}
{"primary_gid": "allsides_3155_1294_3_Mr. Obama_21_30", "sentence_normalized": "The White House said Mr. Obama and Mrs. Merkel agreed that sanctions “should be clearly linked to Russia’s full implementation” of a Ukrainian peace accord and Russian respect for its neighbor’s sovereignty.", "targets": [{"Input.gid": "allsides_3155_1294_3_Mr. Obama_21_30", "from": 21, "to": 30, "mention": "Mr. Obama", "polarity": 6.0, "further_mentions": [{"from": 25, "to": 30, "mention": "Obama"}]}, {"Input.gid": "allsides_3155_1294_3_German Chancellor Angela Merkel_35_46", "from": 35, "to": 46, "mention": "Mrs. Merkel", "polarity": 6.0}]}
{"primary_gid": "allsides_3181_1306_13_Biden_22_27", "sentence_normalized": "> In the words of the Biden family: Beau Biden was, quite simply, the finest man any of us have ever known.", "targets": [{"Input.gid": "allsides_3181_1306_13_Beau_36_40", "from": 36, "to": 40, "mention": "Beau", "polarity": 6.0}, {"Input.gid": "allsides_3181_1306_13_Biden_22_27", "from": 22, "to": 27, "mention": "Biden", "polarity": 6.0}]}
{"primary_gid": "allsides_31_11_9_Chappelle_7_16", "sentence_normalized": "Though Chappelle decided to limit his political commentary to Lamar’s performance, keeping his acceptance speech for best comedy album incredibly short, presenter Trevor Noah took it upon himself to be the first person of the night to mention the president.", "targets": [{"Input.gid": "allsides_31_11_9_Lamar_62_67", "from": 62, "to": 67, "mention": "Lamar", "polarity": 4.0}, {"Input.gid": "allsides_31_11_9_Chappelle_7_16", "from": 7, "to": 16, "mention": "Chappelle", "polarity": 4.0, "further_mentions": [{"from": 34, "to": 37, "mention": "his"}, {"from": 91, "to": 94, "mention": "his"}]}]}
{"primary_gid": "allsides_3277_1348_35_Mr. Simpson_5_30", "sentence_normalized": "When Mr. Simpson and Mr. Soofi pulled up in a dark-colored sedan, hopped out and opened fire from assault rifles, a Garland traffic officer returned fire with his pistol, killing both men despite the bulletproof vests they were wearing.", "targets": [{"Input.gid": "allsides_3277_1348_35_Garland_116_123", "from": 116, "to": 123, "mention": "Garland", "polarity": 4.0}, {"Input.gid": "allsides_3277_1348_35_Mr. Simpson_5_30", "from": 5, "to": 30, "mention": "Mr. Simpson and Mr. Soofi", "polarity": 2.0}]}
{"primary_gid": "allsides_3304_1360_39_Obama himself_0_5", "sentence_normalized": "Obama will have a press conference Tuesday with Japanese Prime Minister Shinzo Abe.", "targets": [{"Input.gid": "allsides_3304_1360_39_Japanese Prime Minister Shinzo Abe_48_82", "from": 48, "to": 82, "mention": "Japanese Prime Minister Shinzo Abe", "polarity": 4.0}, {"Input.gid": "allsides_3304_1360_39_Obama himself_0_5", "from": 0, "to": 5, "mention": "Obama", "polarity": 4.0}]}
{"primary_gid": "allsides_3305_1361_5_Ted Cruz_153_157", "sentence_normalized": "In a statement posted to his Facebook page on Sunday, Reisner sought forgiveness for his \"poor judgement,\" explaining that he did not do his homework on Cruz's record on marriage equality before agreeing to host the event.", "targets": [{"Input.gid": "allsides_3305_1361_5_Ted Cruz_153_157", "from": 153, "to": 157, "mention": "Cruz", "polarity": 2.0}, {"Input.gid": "allsides_3305_1361_5_Gay Businessman Ian Reisner_54_61", "from": 54, "to": 61, "mention": "Reisner", "polarity": 2.0, "further_mentions": [{"from": 85, "to": 88, "mention": "his"}]}]}
{"primary_gid": "allsides_3315_1366_4_Clinton_25_32", "sentence_normalized": "SEE ALSO: Mitt Romney on Clinton Foundation uranium story: ‘It looks like bribery’ White House press secretary Josh Earnest insisted that President Obama is not troubled by reports that the Clinton Foundation accepted $2.35 million from a businessman involved in Russia’s uranium deals that required approval from the U.S. State Department as well as other countries.", "targets": [{"Input.gid": "allsides_3315_1366_4_White House press secretary Josh Earnest_83_123", "from": 83, "to": 123, "mention": "White House press secretary Josh Earnest", "polarity": 4.0}, {"Input.gid": "allsides_3315_1366_4_Clinton_25_32", "from": 25, "to": 32, "mention": "Clinton", "polarity": 2.0}]}
{"primary_gid": "allsides_3372_1390_23_Ayatollah Khamenei_99_117", "sentence_normalized": "Mr. Kerry’s assurances did little to mollify the deal’s many congressional critics, who pounced on Ayatollah Khamenei’s comments as proof that the nuclear deal is unworkable.", "targets": [{"Input.gid": "allsides_3372_1390_23_Mr. Kerry_0_9", "from": 0, "to": 9, "mention": "Mr. Kerry", "polarity": 2.0}, {"Input.gid": "allsides_3372_1390_23_Ayatollah Khamenei_99_117", "from": 99, "to": 117, "mention": "Ayatollah Khamenei", "polarity": 2.0}]}
{"primary_gid": "allsides_3389_1397_15_Netanyahu_0_9", "sentence_normalized": "Netanyahu did not outwardly criticize President Obama, but he said there is a \"legitimate difference of view\" between the two leaders.", "targets": [{"Input.gid": "allsides_3389_1397_15_President Obama_38_53", "from": 38, "to": 53, "mention": "President Obama", "polarity": 2.0}, {"Input.gid": "allsides_3389_1397_15_Netanyahu_0_9", "from": 0, "to": 9, "mention": "Netanyahu", "polarity": 4.0, "further_mentions": [{"from": 59, "to": 61, "mention": "he"}]}]}
{"primary_gid": "allsides_3417_1411_15_Clinton_120_127", "sentence_normalized": "Kendall said the State Department is “uniquely positioned” to respond to requests for additional documents, a sign from Clinton’s camp that they believe she has fully responded to any standing legal requests.", "targets": [{"Input.gid": "allsides_3417_1411_15_Clinton_120_127", "from": 120, "to": 127, "mention": "Clinton", "polarity": 6.0, "further_mentions": [{"from": 153, "to": 156, "mention": "she"}]}, {"Input.gid": "allsides_3417_1411_15_Kendall_0_7", "from": 0, "to": 7, "mention": "Kendall", "polarity": 4.0}]}
{"primary_gid": "allsides_3420_1412_1_Reid_31_35", "sentence_normalized": "Sandoval Leads List to Replace Reid in Senate", "targets": [{"Input.gid": "allsides_3420_1412_1_Reid_31_35", "from": 31, "to": 35, "mention": "Reid", "polarity": 4.0}, {"Input.gid": "allsides_3420_1412_1_Sandoval_0_8", "from": 0, "to": 8, "mention": "Sandoval", "polarity": 6.0}]}
{"primary_gid": "allsides_3461_1428_48_Israeli Prime Minister Benjamin Netanyahu_62_71", "sentence_normalized": "Rivlin will then task the leading candidate, almost certainly Netanyahu, with putting together a coalition that makes up a majority in parliament.", "targets": [{"Input.gid": "allsides_3461_1428_48_Rivlin_0_6", "from": 0, "to": 6, "mention": "Rivlin", "polarity": 4.0}, {"Input.gid": "allsides_3461_1428_48_Israeli Prime Minister Benjamin Netanyahu_62_71", "from": 62, "to": 71, "mention": "Netanyahu", "polarity": 4.0}]}
{"primary_gid": "allsides_3498_1444_3_Barack Obama_0_13", "sentence_normalized": "The president hailed Selma as a city of extreme importance to America's history -- on par with wartime settings of Concord, Lexington and Gettysburg, and places where innovation took great strides such as Kitty Hawk and Cape Canaveral.", "targets": [{"Input.gid": "allsides_3498_1444_3_Selma_21_26", "from": 21, "to": 26, "mention": "Selma", "polarity": 6.0}, {"Input.gid": "allsides_3498_1444_3_Barack Obama_0_13", "from": 0, "to": 13, "mention": "The president", "polarity": 6.0}]}
{"primary_gid": "allsides_3514_1451_31_Brian P. Fletcher, a former Ferguson mayor who is running for City Council in next month’s election_13_15", "sentence_normalized": "For example, he said, the racial disparity could be explained not by bias but by the large number of black people from surrounding towns who visit Ferguson to shop.", "targets": [{"Input.gid": "allsides_3514_1451_31_Ferguson_147_155", "from": 147, "to": 155, "mention": "Ferguson", "polarity": 4.0}, {"Input.gid": "allsides_3514_1451_31_Brian P. Fletcher, a former Ferguson mayor who is running for City Council in next month’s election_13_15", "from": 13, "to": 15, "mention": "he", "polarity": 4.0}]}
{"primary_gid": "allsides_3517_1452_42_Netanyahu_34_52", "sentence_normalized": "Obama said he would not meet with the prime minister because the visit comes too close to the Israeli elections on March 17.", "targets": [{"Input.gid": "allsides_3517_1452_42_Netanyahu_34_52", "from": 34, "to": 52, "mention": "the prime minister", "polarity": 4.0}, {"Input.gid": "allsides_3517_1452_42_President Obama_0_5", "from": 0, "to": 5, "mention": "Obama", "polarity": 4.0}]}
{"primary_gid": "allsides_3521_1454_0_Clinton_7_14", "sentence_normalized": "Gibbs: Clinton's use of private emails 'highly unusual'", "targets": [{"Input.gid": "allsides_3521_1454_0_Clinton_7_14", "from": 7, "to": 14, "mention": "Clinton", "polarity": 2.0}, {"Input.gid": "allsides_3521_1454_0_Gibbs_0_5", "from": 0, "to": 5, "mention": "Gibbs", "polarity": 4.0}]}
{"primary_gid": "allsides_3523_1455_16_Barbara Mikulski (D-MD) – who has served in Congress longer than any other woman in American history_198_201", "sentence_normalized": "“I want the people of Maryland to know there’s nothing gloomy about this announcement: There’s no health problem, I’m not frustrated with the Senate — the Senate will always be what the Senate is,” she intoned.", "targets": [{"Input.gid": "allsides_3523_1455_16_Barbara Mikulski (D-MD) – who has served in Congress longer than any other woman in American history_198_201", "from": 198, "to": 201, "mention": "she", "polarity": 4.0}, {"Input.gid": "allsides_3523_1455_16_’m_115_117", "from": 115, "to": 117, "mention": "’m", "polarity": 4.0}]}
{"primary_gid": "allsides_3570_1473_2_Joe Clancy_73_85", "sentence_normalized": "White House press secretary Josh Earnest said the president decided that Mr. Clancy “has demonstrated that he was willing to conduct a candid, clear-eyed assessment of the shortcoming of that agency and to look at needed reforms and implement them.”", "targets": [{"Input.gid": "allsides_3570_1473_2_White House press secretary Josh Earnest_0_40", "from": 0, "to": 40, "mention": "White House press secretary Josh Earnest", "polarity": 4.0}, {"Input.gid": "allsides_3570_1473_2_Joe Clancy_73_85", "from": 73, "to": 85, "mention": "Mr. Clancy “", "polarity": 6.0, "further_mentions": [{"from": 107, "to": 109, "mention": "he"}]}]}
{"primary_gid": "allsides_3591_1481_3_John Kitzhaber_0_14", "sentence_normalized": "John Kitzhaber submitted his resignation Friday amid allegations that his fiancée Cylvia Hayes used their public positions for private gain, accepting money from private environmental nonprofits to pursue green policies in the state.", "targets": [{"Input.gid": "allsides_3591_1481_3_Cylvia Hayes_82_94", "from": 82, "to": 94, "mention": "Cylvia Hayes", "polarity": 2.0}, {"Input.gid": "allsides_3591_1481_3_John Kitzhaber_0_14", "from": 0, "to": 14, "mention": "John Kitzhaber", "polarity": 2.0, "further_mentions": [{"from": 25, "to": 28, "mention": "his"}, {"from": 70, "to": 73, "mention": "his"}]}]}
{"primary_gid": "allsides_3608_1488_25_Harrington_62_72", "sentence_normalized": "Matthew's first court appearance on the newest charges in the Harrington case is scheduled for Feb. 18, Lunsford said.", "targets": [{"Input.gid": "allsides_3608_1488_25_Harrington_62_72", "from": 62, "to": 72, "mention": "Harrington", "polarity": 4.0}, {"Input.gid": "allsides_3608_1488_25_Albemarle County prosecutor Denise Lunsford_104_112", "from": 104, "to": 112, "mention": "Lunsford", "polarity": 4.0}]}
{"primary_gid": "allsides_3629_1496_11_Federal Communications Commission Chairman Tom Wheeler_78_85", "sentence_normalized": "A senior FCC official addressed the effect of the president's announcement on Wheeler's decision-making on a call with reporters Wednesday.", "targets": [{"Input.gid": "allsides_3629_1496_11_Federal Communications Commission Chairman Tom Wheeler_78_85", "from": 78, "to": 85, "mention": "Wheeler", "polarity": 4.0}, {"Input.gid": "allsides_3629_1496_11_President Barack Obama_46_59", "from": 46, "to": 59, "mention": "the president", "polarity": 4.0}]}
{"primary_gid": "allsides_366_148_15_Mr. Trump_43_48", "sentence_normalized": "“We want Putin’s help on North Korea,” Mr. Trump said.", "targets": [{"Input.gid": "allsides_366_148_15_Mr. Trump_43_48", "from": 43, "to": 48, "mention": "Trump", "polarity": 4.0, "further_mentions": [{"from": 39, "to": 48, "mention": "Mr. Trump"}]}, {"Input.gid": "allsides_366_148_15_President Vladimir V. Putin of Russia_9_14", "from": 9, "to": 14, "mention": "Putin", "polarity": 6.0}]}
{"primary_gid": "allsides_3676_1519_0_Jeb Bush_0_8", "sentence_normalized": "Jeb Bush and Mitt Romney to meet, talk 2016", "targets": [{"Input.gid": "allsides_3676_1519_0_Mitt Romney_13_24", "from": 13, "to": 24, "mention": "Mitt Romney", "polarity": 4.0}, {"Input.gid": "allsides_3676_1519_0_Jeb Bush_0_8", "from": 0, "to": 8, "mention": "Jeb Bush", "polarity": 4.0}]}
{"primary_gid": "allsides_3676_1519_5_Jeb Bush_0_13", "sentence_normalized": "Governor Bush is very much looking forward to the opportunity to catch up and visit with Governor Romney.", "targets": [{"Input.gid": "allsides_3676_1519_5_Jeb Bush_0_13", "from": 0, "to": 13, "mention": "Governor Bush", "polarity": 6.0}, {"Input.gid": "allsides_3676_1519_5_Mitt Romney_89_104", "from": 89, "to": 104, "mention": "Governor Romney", "polarity": 6.0}]}
{"primary_gid": "allsides_36_13_33_Sessions_0_8", "sentence_normalized": "Sessions has not confirmed that he offered his resignation to Trump.", "targets": [{"Input.gid": "allsides_36_13_33_Sessions_0_8", "from": 0, "to": 8, "mention": "Sessions", "polarity": 4.0}, {"Input.gid": "allsides_36_13_33_President Donald Trump_62_67", "from": 62, "to": 67, "mention": "Trump", "polarity": 4.0}]}
{"primary_gid": "allsides_372_150_8_Mueller_23_30", "sentence_normalized": "Gaetz was referring to Mueller’s supervision of a bribery probe involving a subsidiary of Russia’s Rosatom, which eventually got approval from the U.S. to buy a Canadian mining company, Uranium One, that controlled a swath of American uranium reserves.", "targets": [{"Input.gid": "allsides_372_150_8_Mueller_23_30", "from": 23, "to": 30, "mention": "Mueller", "polarity": 4.0}, {"Input.gid": "allsides_372_150_8_Gaetz_0_5", "from": 0, "to": 5, "mention": "Gaetz", "polarity": 4.0}]}
{"primary_gid": "allsides_3733_1543_0_Obama_17_22", "sentence_normalized": "Mitch McConnell: Obama will determine how much new Congress works", "targets": [{"Input.gid": "allsides_3733_1543_0_Mitch McConnell_0_15", "from": 0, "to": 15, "mention": "Mitch McConnell", "polarity": 4.0}, {"Input.gid": "allsides_3733_1543_0_Obama_17_22", "from": 17, "to": 22, "mention": "Obama", "polarity": 4.0}]}
{"primary_gid": "allsides_3744_1548_5_Steve King (Iowa)_0_17", "sentence_normalized": "Steve King (Iowa) indicated he “can’t vote for John Boehner again.”", "targets": [{"Input.gid": "allsides_3744_1548_5_Steve King (Iowa)_0_17", "from": 0, "to": 17, "mention": "Steve King (Iowa)", "polarity": 4.0, "further_mentions": [{"from": 28, "to": 30, "mention": "he"}]}, {"Input.gid": "allsides_3744_1548_5_Boehner_47_59", "from": 47, "to": 59, "mention": "John Boehner", "polarity": 2.0}]}
{"primary_gid": "allsides_376_151_10_Tom Perez_12_14", "sentence_normalized": "\"And either he's going to succeed by bringing Bernie Sanders and Bernie Sanders's representatives into the process, and they're going to say it's fair, it works, we all believe it, or he's going to fail.", "targets": [{"Input.gid": "allsides_376_151_10_Bernie Sanders_46_60", "from": 46, "to": 60, "mention": "Bernie Sanders", "polarity": 6.0, "further_mentions": [{"from": 65, "to": 79, "mention": "Bernie Sanders"}, {"from": 65, "to": 81, "mention": "Bernie Sanders's"}]}, {"Input.gid": "allsides_376_151_10_Tom Perez_12_14", "from": 12, "to": 14, "mention": "he", "polarity": 6.0, "further_mentions": [{"from": 184, "to": 186, "mention": "he"}]}]}
{"primary_gid": "allsides_3811_1577_20_Ted Cruz (R-Texas)_82_86", "sentence_normalized": "I know you want to speak about Jeb Bush, but I'm speaking about President Obama,\" Cruz told reporters.", "targets": [{"Input.gid": "allsides_3811_1577_20_President Barack Obama_64_79", "from": 64, "to": 79, "mention": "President Obama", "polarity": 4.0}, {"Input.gid": "allsides_3811_1577_20_Ted Cruz (R-Texas)_82_86", "from": 82, "to": 86, "mention": "Cruz", "polarity": 4.0}]}
{"primary_gid": "allsides_3825_1583_8_Pelosi_179_185", "sentence_normalized": "A similar coalition balked later at final passage, which was supposed to occur around 2 p.m., forcing House Speaker John Boehner (R-Ohio) to delay a final vote until after 9 p.m. Pelosi marshaled her caucus against the bill even after the White House urged support.", "targets": [{"Input.gid": "allsides_3825_1583_8_House Speaker John Boehner (R-Ohio)_102_137", "from": 102, "to": 137, "mention": "House Speaker John Boehner (R-Ohio)", "polarity": 2.0, "further_mentions": [{"from": 196, "to": 199, "mention": "her"}]}, {"Input.gid": "allsides_3825_1583_8_Pelosi_179_185", "from": 179, "to": 185, "mention": "Pelosi", "polarity": 2.0}]}
{"primary_gid": "allsides_3862_1600_2_Chuck Hagel_29_38", "sentence_normalized": "Mr. Carter served under both Mr. Hagel and former Defense Secretary Leon Panetta.", "targets": [{"Input.gid": "allsides_3862_1600_2_Ash Carter_0_10", "from": 0, "to": 10, "mention": "Mr. Carter", "polarity": 4.0}, {"Input.gid": "allsides_3862_1600_2_Chuck Hagel_29_38", "from": 29, "to": 38, "mention": "Mr. Hagel", "polarity": 4.0}]}
{"primary_gid": "allsides_3871_1604_10_Wilson_19_25", "sentence_normalized": "\"We were not after Wilson's job,\" Sharpton wrote in a statement.", "targets": [{"Input.gid": "allsides_3871_1604_10_Al Sharpton_34_42", "from": 34, "to": 42, "mention": "Sharpton", "polarity": 4.0}, {"Input.gid": "allsides_3871_1604_10_Wilson_19_25", "from": 19, "to": 25, "mention": "Wilson", "polarity": 4.0}]}
{"primary_gid": "allsides_3871_1604_2_Wilson_124_130", "sentence_normalized": "Stephanie Karr, Ferguson city attorney, told the Associated Press that city officials planned to make a statement regarding Wilson's resignation.", "targets": [{"Input.gid": "allsides_3871_1604_2_Wilson_124_130", "from": 124, "to": 130, "mention": "Wilson", "polarity": 4.0}, {"Input.gid": "allsides_3871_1604_2_Ferguson_16_24", "from": 16, "to": 24, "mention": "Ferguson", "polarity": 4.0}]}
{"primary_gid": "allsides_3884_1610_14_Ferguson Officer Darren Wilson_0_6", "sentence_normalized": "Wilson said he asked a dispatcher to send additional police, then backed his vehicle up in front of Brown and his friend.", "targets": [{"Input.gid": "allsides_3884_1610_14_[Michael Brown]_100_105", "from": 100, "to": 105, "mention": "Brown", "polarity": 4.0, "further_mentions": [{"from": 110, "to": 113, "mention": "his"}]}, {"Input.gid": "allsides_3884_1610_14_Ferguson Officer Darren Wilson_0_6", "from": 0, "to": 6, "mention": "Wilson", "polarity": 4.0, "further_mentions": [{"from": 73, "to": 76, "mention": "his"}, {"from": 12, "to": 14, "mention": "he"}]}]}
{"primary_gid": "allsides_3885_1610_18_President Obama_8_23", "sentence_normalized": "Instead President Obama read Mr. Brown’s words calling for people to avoid violence: “Hurting and destroying others is not the answer,” Mr. Brown said a week ago, setting the stage for a constructive response no matter what the grand jury decided.", "targets": [{"Input.gid": "allsides_3885_1610_18_Brown_33_38", "from": 33, "to": 38, "mention": "Brown", "polarity": 6.0}, {"Input.gid": "allsides_3885_1610_18_President Obama_8_23", "from": 8, "to": 23, "mention": "President Obama", "polarity": 6.0}]}
{"primary_gid": "allsides_3888_1611_26_Secretary of State John Kerry_0_9", "sentence_normalized": "Mr. Kerry went out of his way to compliment the lead Iranian negotiator, Mr. Zarif, who American officials have described as a creative diplomat who is forced to navigate Iran’s treacherous politics and is uncertain how far the country’s supreme leader will let him go.", "targets": [{"Input.gid": "allsides_3888_1611_26_Mr. Zarif_73_82", "from": 73, "to": 82, "mention": "Mr. Zarif", "polarity": 6.0}, {"Input.gid": "allsides_3888_1611_26_Secretary of State John Kerry_0_9", "from": 0, "to": 9, "mention": "Mr. Kerry", "polarity": 6.0}]}
{"primary_gid": "allsides_3890_1612_14_President Obama_35_40", "sentence_normalized": "But in remarks at the White House, Obama praised Hagel as \"an exemplary defense secretary\" and steady hand for strategy and budget.", "targets": [{"Input.gid": "allsides_3890_1612_14_Hagel_49_54", "from": 49, "to": 54, "mention": "Hagel", "polarity": 6.0}, {"Input.gid": "allsides_3890_1612_14_President Obama_35_40", "from": 35, "to": 40, "mention": "Obama", "polarity": 6.0}]}
{"primary_gid": "allsides_3898_1616_35_Sylvia Mathews Burwell, the secretary of health and human services_0_3", "sentence_normalized": "She confirmed to the bloggers that immigrants who were covered by Mr. Obama’s 2012 executive actions could not receive subsidies from the HealthCare.gov marketplace.", "targets": [{"Input.gid": "allsides_3898_1616_35_Mr. Obama_66_75", "from": 66, "to": 75, "mention": "Mr. Obama", "polarity": 4.0}, {"Input.gid": "allsides_3898_1616_35_Sylvia Mathews Burwell, the secretary of health and human services_0_3", "from": 0, "to": 3, "mention": "She", "polarity": 4.0}]}
{"primary_gid": "allsides_3916_1626_19_Cassidy_0_7", "sentence_normalized": "Cassidy, a four-term congressman, placed second to Landrieu on Election Day in a multi-candidate primary, but recent polling shows him with a comfortable lead.", "targets": [{"Input.gid": "allsides_3916_1626_19_Cassidy_0_7", "from": 0, "to": 7, "mention": "Cassidy", "polarity": 6.0}, {"Input.gid": "allsides_3916_1626_19_Landrieu_51_59", "from": 51, "to": 59, "mention": "Landrieu", "polarity": 4.0}]}
{"primary_gid": "allsides_3939_1636_17_Jeb Bush_0_8", "sentence_normalized": "Mr. Bush also said that he was surprised that in 2003 Saddam Hussein, the leader of Iraq, did not abandon his country and leave when the United States threatened to invade.", "targets": [{"Input.gid": "allsides_3939_1636_17_Saddam Hussein_54_68", "from": 54, "to": 68, "mention": "Saddam Hussein", "polarity": 4.0, "further_mentions": [{"from": 106, "to": 109, "mention": "his"}]}, {"Input.gid": "allsides_3939_1636_17_Jeb Bush_0_8", "from": 0, "to": 8, "mention": "Mr. Bush", "polarity": 4.0, "further_mentions": [{"from": 24, "to": 26, "mention": "he"}]}]}
{"primary_gid": "allsides_3940_1637_25_Obama_56_63", "sentence_normalized": "In her time as U.S. Attorney, Lynch has made a name for herself in a number of high-profile convictions, including a thwarted Al Qaeda-sanctioned plot to attack the New York subway system, and pursuing the head of a Mexican drug cartel for 12 murders.", "targets": [{"Input.gid": "allsides_3940_1637_25_Obama_56_63", "from": 56, "to": 63, "mention": "herself", "polarity": 6.0, "further_mentions": [{"from": 3, "to": 6, "mention": "her"}]}, {"Input.gid": "allsides_3940_1637_25_US Attorney Loretta Lynch_30_35", "from": 30, "to": 35, "mention": "Lynch", "polarity": 6.0}]}
{"primary_gid": "allsides_3941_1637_4_President Obama_0_2", "sentence_normalized": "He will be joined by Ms. Lynch and Eric H. Holder Jr., the current attorney general, who has announced his plans to step down.", "targets": [{"Input.gid": "allsides_3941_1637_4_President Obama_0_2", "from": 0, "to": 2, "mention": "He", "polarity": 4.0, "further_mentions": [{"from": 103, "to": 106, "mention": "his"}]}, {"Input.gid": "allsides_3941_1637_4_Ms. Lynch_21_30", "from": 21, "to": 30, "mention": "Ms. Lynch", "polarity": 4.0}]}
{"primary_gid": "allsides_3963_1647_24_\" Ernst_33_43", "sentence_normalized": "The relative attractiveness of \"John Ernst\" would not likely be a focus for Harkin.", "targets": [{"Input.gid": "allsides_3963_1647_24_\" Ernst_33_43", "from": 32, "to": 42, "mention": "John Ernst", "polarity": 6.0}, {"Input.gid": "allsides_3963_1647_24_Tom Harkin_77_83", "from": 76, "to": 82, "mention": "Harkin", "polarity": 4.0}]}
{"primary_gid": "allsides_3981_1653_7_Frein_97_102", "sentence_normalized": "Tonkin declined to elaborate, but said authorities \"have now started to find the answers\" behind Frein's alleged ambush.", "targets": [{"Input.gid": "allsides_3981_1653_7_Pike County District Attorney Ray Tonkin_0_6", "from": 0, "to": 6, "mention": "Tonkin", "polarity": 4.0}, {"Input.gid": "allsides_3981_1653_7_Frein_97_102", "from": 97, "to": 102, "mention": "Frein", "polarity": 2.0}]}
{"primary_gid": "allsides_4022_1671_4_Oscar Pistorius_41_50", "sentence_normalized": "Last month, Judge Thokozile Masipa found Pistorius not guilty of murder, but guilty of culpable homicide.", "targets": [{"Input.gid": "allsides_4022_1671_4_Oscar Pistorius_41_50", "from": 41, "to": 50, "mention": "Pistorius", "polarity": 2.0}, {"Input.gid": "allsides_4022_1671_4_Judge Thokozile Masipa_12_34", "from": 12, "to": 34, "mention": "Judge Thokozile Masipa", "polarity": 4.0}]}
{"primary_gid": "allsides_4047_1681_30_Grimes_0_6", "sentence_normalized": "Grimes, Kentucky’s secretary of state, has said throughout the campaign that McConnell’s conservative leadership has denied Kentuckians jobs and health care.", "targets": [{"Input.gid": "allsides_4047_1681_30_The 72-year-old McConnell_77_86", "from": 77, "to": 86, "mention": "McConnell", "polarity": 2.0}, {"Input.gid": "allsides_4047_1681_30_Grimes_0_6", "from": 0, "to": 6, "mention": "Grimes", "polarity": 4.0}]}
{"primary_gid": "allsides_4055_1684_3_Duncan_65_71", "sentence_normalized": "At a briefing in Atlanta, Frieden said that at some point during Duncan's treatment, \"there was a breach in protocol, and that breach in protocol resulted in this infection.\"", "targets": [{"Input.gid": "allsides_4055_1684_3_Frieden_26_33", "from": 26, "to": 33, "mention": "Frieden", "polarity": 4.0}, {"Input.gid": "allsides_4055_1684_3_Duncan_65_71", "from": 65, "to": 71, "mention": "Duncan", "polarity": 4.0}]}
{"primary_gid": "allsides_4083_1696_17_Michelle Obama_53_58", "sentence_normalized": "Fox Business Network’s Lou Dobbs openly scoffed that Obama has saved anything.", "targets": [{"Input.gid": "allsides_4083_1696_17_Lou Dobbs_23_32", "from": 23, "to": 32, "mention": "Lou Dobbs", "polarity": 2.0}, {"Input.gid": "allsides_4083_1696_17_Michelle Obama_53_58", "from": 53, "to": 58, "mention": "Obama", "polarity": 2.0}]}
{"primary_gid": "allsides_4156_1731_4_girlfriend Reeva Steenkamp_97_106", "sentence_normalized": "Masipa said prosecutors had not proven beyond a reasonable doubt that Pistorius intended to kill Steenkamp.", "targets": [{"Input.gid": "allsides_4156_1731_4_girlfriend Reeva Steenkamp_97_106", "from": 97, "to": 106, "mention": "Steenkamp", "polarity": 4.0}, {"Input.gid": "allsides_4156_1731_4_Judge Thokozile Masipa_0_6", "from": 0, "to": 6, "mention": "Masipa", "polarity": 4.0}]}
{"primary_gid": "allsides_4209_1754_19_Benton_45_51", "sentence_normalized": "In 2013, a phone recording surfaced in which Benton said that he was holding his nose while working for McConnell and thinking of the long-term best interests of Sen.", "targets": [{"Input.gid": "allsides_4209_1754_19_Benton_45_51", "from": 45, "to": 51, "mention": "Benton", "polarity": 2.0}, {"Input.gid": "allsides_4209_1754_19_McConnell_104_113", "from": 104, "to": 113, "mention": "McConnell", "polarity": 2.0}]}
{"primary_gid": "allsides_4209_1754_2_Mitch McConnell's_30_39", "sentence_normalized": "The announcement comes as the McConnell campaign wrestles with Benton's possible ties to a bribery scandal when he was political director for then-Rep.", "targets": [{"Input.gid": "allsides_4209_1754_2_Benton_63_69", "from": 63, "to": 69, "mention": "Benton", "polarity": 2.0}, {"Input.gid": "allsides_4209_1754_2_Mitch McConnell's_30_39", "from": 30, "to": 39, "mention": "McConnell", "polarity": 2.0}]}
{"primary_gid": "allsides_4255_1774_8_Michael Brown_17_22", "sentence_normalized": "But they believe Brown died from a final bullet fired through the top of his skull because all of the other gunshot wounds were survivable, Baden said.", "targets": [{"Input.gid": "allsides_4255_1774_8_Dr. Michael Baden, the former New York City chief medical examiner who conducted the autopsy_4_8", "from": 4, "to": 8, "mention": "they", "polarity": 4.0}, {"Input.gid": "allsides_4255_1774_8_Michael Brown_17_22", "from": 17, "to": 22, "mention": "Brown", "polarity": 4.0, "further_mentions": [{"from": 73, "to": 76, "mention": "his"}]}]}
{"primary_gid": "allsides_425_169_8_President Trump_0_15", "sentence_normalized": "President Trump is to blame, he said without mentioning him by name.", "targets": [{"Input.gid": "allsides_425_169_8_This Flake_56_59", "from": 56, "to": 59, "mention": "him", "polarity": 2.0}, {"Input.gid": "allsides_425_169_8_President Trump_0_15", "from": 0, "to": 15, "mention": "President Trump", "polarity": 2.0, "further_mentions": [{"from": 29, "to": 31, "mention": "he"}]}]}
{"primary_gid": "allsides_4265_1779_1_Ferguson_15_23", "sentence_normalized": "Residents in Ferguson, Missouri, on Wednesday night were once again demonstrating in protest of the controversial shooting death of 18-year-old Michael Brown.", "targets": [{"Input.gid": "allsides_4265_1779_1_18-year-old Michael Brown_134_159", "from": 132, "to": 157, "mention": "18-year-old Michael Brown", "polarity": 4.0}, {"Input.gid": "allsides_4265_1779_1_Ferguson_15_23", "from": 13, "to": 21, "mention": "Ferguson", "polarity": 4.0}]}
{"primary_gid": "allsides_4284_1787_21_Ms. Hanabusa_74_86", "sentence_normalized": "In the last days of his life in 2012, he asked Mr. Abercrombie to appoint Ms. Hanabusa to succeed him.", "targets": [{"Input.gid": "allsides_4284_1787_21_Ms. Hanabusa_74_86", "from": 74, "to": 86, "mention": "Ms. Hanabusa", "polarity": 6.0}, {"Input.gid": "allsides_4284_1787_21_Neil Abercrombie_47_62", "from": 47, "to": 62, "mention": "Mr. Abercrombie", "polarity": 4.0}]}
{"primary_gid": "allsides_431_172_9_Vladimir Putin_1_6", "sentence_normalized": "\"Putin is so rattled by the spreading Magnitsky sanctions around the world that he’s ready to run roughshod over all rules and western norms,\" Browder told The Guardian.", "targets": [{"Input.gid": "allsides_431_172_9_Vladimir Putin_1_6", "from": 1, "to": 6, "mention": "Putin", "polarity": 2.0, "further_mentions": [{"from": 143, "to": 150, "mention": "Browder"}, {"from": 80, "to": 82, "mention": "he"}]}, {"Input.gid": "allsides_431_172_9_Magnitsky_38_47", "from": 38, "to": 47, "mention": "Magnitsky", "polarity": 4.0}]}
{"primary_gid": "allsides_433_172_3_Browder_0_7", "sentence_normalized": "Browder adds that the U.S. government wouldn’t want to be seen as “helping Putin.”", "targets": [{"Input.gid": "allsides_433_172_3_Vladimir Putin's_75_80", "from": 75, "to": 80, "mention": "Putin", "polarity": 2.0}, {"Input.gid": "allsides_433_172_3_Browder_0_7", "from": 0, "to": 7, "mention": "Browder", "polarity": 4.0}]}
{"primary_gid": "allsides_4341_1813_0_Obama_36_41", "sentence_normalized": "Senate Hopeful Joe Miller Calls For Obama's Impeachment, Blasts Mark Begich Over Border", "targets": [{"Input.gid": "allsides_4341_1813_0_Obama_36_41", "from": 36, "to": 41, "mention": "Obama", "polarity": 2.0}, {"Input.gid": "allsides_4341_1813_0_Blasts Mark Begich Over Border_57_87", "from": 57, "to": 87, "mention": "Blasts Mark Begich Over Border", "polarity": 2.0}]}
{"primary_gid": "allsides_4365_1823_35_Cantor_65_71", "sentence_normalized": "The conventional wisdom is that Boehner has been strengthened by Cantor's defeat, as his strongest potential challenger for the speaker's gavel has been removed.", "targets": [{"Input.gid": "allsides_4365_1823_35_Cantor_65_71", "from": 65, "to": 71, "mention": "Cantor", "polarity": 2.0}, {"Input.gid": "allsides_4365_1823_35_\" Boehner_32_39", "from": 32, "to": 39, "mention": "Boehner", "polarity": 6.0, "further_mentions": [{"from": 85, "to": 88, "mention": "his"}]}]}
{"primary_gid": "allsides_436_174_5_George H.W. Bush_29_45", "sentence_normalized": "“To Presidents Jimmy Carter, George H.W. Bush, Bill Clinton, George W. Bush and Barack Obama, Melania and I want to express our deep gratitude for your tremendous assistance,” Trump said in the message.", "targets": [{"Input.gid": "allsides_436_174_5_George H.W. Bush_29_45", "from": 29, "to": 45, "mention": "George H.W. Bush", "polarity": 6.0, "further_mentions": [{"from": 61, "to": 75, "mention": "George W. Bush"}]}, {"Input.gid": "allsides_436_174_5_current President Donald Trump — sort of_176_181", "from": 176, "to": 181, "mention": "Trump", "polarity": 4.0}]}
{"primary_gid": "allsides_4387_1831_23_Bergdahl_17_25", "sentence_normalized": "The aftermath of Bergdahl's release has been consumed by controversy, with many service members claiming that Bergdahl deserted prior to his capture in 2009.", "targets": [{"Input.gid": "allsides_4387_1831_23_their leader Mullah Mohammad Omar_137_140", "from": 137, "to": 140, "mention": "his", "polarity": 2.0}, {"Input.gid": "allsides_4387_1831_23_Bergdahl_17_25", "from": 17, "to": 25, "mention": "Bergdahl", "polarity": 2.0, "further_mentions": [{"from": 110, "to": 118, "mention": "Bergdahl"}]}]}
{"primary_gid": "allsides_4438_1855_4_Karl Rove_0_4", "sentence_normalized": "Rove said his other point was that Clinton’s health will be an issue if she runs in 2016 “whether she likes it or not.”", "targets": [{"Input.gid": "allsides_4438_1855_4_Karl Rove_0_4", "from": 0, "to": 4, "mention": "Rove", "polarity": 4.0, "further_mentions": [{"from": 10, "to": 13, "mention": "his"}]}, {"Input.gid": "allsides_4438_1855_4_Hillary Clinton_35_42", "from": 35, "to": 42, "mention": "Clinton", "polarity": 2.0, "further_mentions": [{"from": 98, "to": 101, "mention": "she"}, {"from": 72, "to": 75, "mention": "she"}]}]}
{"primary_gid": "allsides_4462_1865_4_Monica Lewinsky_154_157", "sentence_normalized": "\"The Clinton administration, the special prosecutor's minions, the political operatives on both sides of the aisle, and the media were able to brand me,\" she wrote.", "targets": [{"Input.gid": "allsides_4462_1865_4_Monica Lewinsky_154_157", "from": 154, "to": 157, "mention": "she", "polarity": 4.0}, {"Input.gid": "allsides_4462_1865_4_Clinton_5_12", "from": 5, "to": 12, "mention": "Clinton", "polarity": 2.0}]}
{"primary_gid": "allsides_4468_1868_5_Trey Gowdy_72_75", "sentence_normalized": "His background as a federal prosecutor and his zeal for the truth make him the ideal person to lead this panel,\" Boehner said in a statement on Monday afternoon.", "targets": [{"Input.gid": "allsides_4468_1868_5_House Speaker John A. Boehner (R-Ohio)_114_121", "from": 113, "to": 120, "mention": "Boehner", "polarity": 6.0}, {"Input.gid": "allsides_4468_1868_5_Trey Gowdy_72_75", "from": 71, "to": 74, "mention": "him", "polarity": 6.0, "further_mentions": [{"from": 0, "to": 3, "mention": "His"}, {"from": 43, "to": 46, "mention": "his"}]}]}
{"primary_gid": "allsides_4481_1873_14_Clayton Lockett_1_16", "sentence_normalized": "Clayton Lockett tried to rob a house Miss Neiman was at.", "targets": [{"Input.gid": "allsides_4481_1873_14_Stephanie Neiman_38_49", "from": 37, "to": 48, "mention": "Miss Neiman", "polarity": 4.0, "further_mentions": [{"from": 42, "to": 48, "mention": "Neiman"}]}, {"Input.gid": "allsides_4481_1873_14_Clayton Lockett_1_16", "from": 0, "to": 15, "mention": "Clayton Lockett", "polarity": 2.0}]}
{"primary_gid": "allsides_4546_1901_3_Yanukovych_103_113", "sentence_normalized": "Kremlin spokesman Dmitry Peskov made the envoy announcement after Putin and Ukrainian President Viktor Yanukovych talked over the phone, state-run news agency RIA Novosti reported, according to Reuters.", "targets": [{"Input.gid": "allsides_4546_1901_3_Yanukovych_103_113", "from": 103, "to": 113, "mention": "Yanukovych", "polarity": 4.0}, {"Input.gid": "allsides_4546_1901_3_Russian President Vladimir Putin_66_71", "from": 66, "to": 71, "mention": "Putin", "polarity": 4.0}]}
{"primary_gid": "allsides_4605_1928_30_Begich_82_84", "sentence_normalized": "The new report comes only days after Obama's State of the Union address, in which he reiterated his support for an \"all-of-the-above\" energy strategy that embraces a wide range of sources, from oil and natural gas to renewables such as wind and solar power.", "targets": [{"Input.gid": "allsides_4605_1928_30_Obama_37_42", "from": 37, "to": 42, "mention": "Obama", "polarity": 6.0}, {"Input.gid": "allsides_4605_1928_30_Begich_82_84", "from": 82, "to": 84, "mention": "he", "polarity": 6.0, "further_mentions": [{"from": 96, "to": 99, "mention": "his"}]}]}
{"primary_gid": "allsides_4605_1928_7_Obama_28_33", "sentence_normalized": "Mary Landrieu in calling on Obama to approve the project, proposed back in 2010.", "targets": [{"Input.gid": "allsides_4605_1928_7_Mary Landrieu_0_13", "from": 0, "to": 13, "mention": "Mary Landrieu", "polarity": 4.0}, {"Input.gid": "allsides_4605_1928_7_Obama_28_33", "from": 28, "to": 33, "mention": "Obama", "polarity": 4.0}]}
{"primary_gid": "allsides_4630_1939_31_Mr. Cropper_0_3", "sentence_normalized": "His mother said she did not believe that Mr. Aguilar knew Ms. Benlolo, as some online reports had suggested.", "targets": [{"Input.gid": "allsides_4630_1939_31_Mr. Cropper_0_3", "from": 0, "to": 3, "mention": "His", "polarity": 4.0}, {"Input.gid": "allsides_4630_1939_31_Aguilar_41_52", "from": 41, "to": 52, "mention": "Mr. Aguilar", "polarity": 4.0}]}
{"primary_gid": "allsides_4643_1945_4_Christie_64_72", "sentence_normalized": "Also on Monday, nine-time Olympic gold medalist Carl Lewis said Christie dropped a plan to appoint him the state's first physical fitness ambassador when he launched a political campaign against a Christie friend.", "targets": [{"Input.gid": "allsides_4643_1945_4_Christie_64_72", "from": 64, "to": 72, "mention": "Christie", "polarity": 2.0, "further_mentions": [{"from": 197, "to": 205, "mention": "Christie"}]}, {"Input.gid": "allsides_4643_1945_4_nine-time Olympic gold medalist Carl Lewis_16_58", "from": 16, "to": 58, "mention": "nine-time Olympic gold medalist Carl Lewis", "polarity": 6.0, "further_mentions": [{"from": 154, "to": 156, "mention": "he"}, {"from": 99, "to": 102, "mention": "him"}]}]}
{"primary_gid": "allsides_4658_1951_2_Obama_345_350", "sentence_normalized": "“I think what we are going to see in the speech, Joe, is all of the language in the speech kind of fading left about transformation and transparency and checks and balances, but, frankly, I think the substance of the speech is going to be holding his ground,” Hayden told MSNBC’s “Morning Joe” host Joe Scarborough based on news reports of what Obama will unveil on Friday.", "targets": [{"Input.gid": "allsides_4658_1951_2_Obama_345_350", "from": 345, "to": 350, "mention": "Obama", "polarity": 4.0}, {"Input.gid": "allsides_4658_1951_2_Hayden_260_266", "from": 260, "to": 266, "mention": "Hayden", "polarity": 4.0}]}
{"primary_gid": "allsides_4661_1953_17_Defense MSNBC President Phil Griffin_0_7", "sentence_normalized": "Griffin spoke the Hollywood Reporter’s Marisa Guthrie about the controversies that prompted Martin Bashir and Alec Baldwin to leave the network and Melissa Harris-Perry to apologize.", "targets": [{"Input.gid": "allsides_4661_1953_17_Martin Bashir_92_105", "from": 92, "to
Download .txt
gitextract_ate4vaz2/

├── .gitignore
├── .idea/
│   ├── .gitignore
│   ├── NewsMTSC.iml
│   ├── misc.xml
│   ├── modules.xml
│   └── vcs.xml
├── CODE_OF_CONDUCT.md
├── LICENSE
├── MANIFEST.in
├── NewsSentiment/
│   ├── .gitignore
│   ├── DatasetPreparer.py
│   ├── SentimentClasses.py
│   ├── __init__.py
│   ├── __main__.py
│   ├── combinations_default.py
│   ├── consts.py
│   ├── controller.py
│   ├── controller_data/
│   │   └── datasets/
│   │       ├── NewsMTSC-dataset/
│   │       │   ├── devtest_mt.jsonl
│   │       │   ├── devtest_rw.jsonl
│   │       │   ├── readme.md
│   │       │   └── train.jsonl
│   │       ├── acl14twitter/
│   │       │   ├── test.raw.jsonl
│   │       │   └── train.raw.jsonl
│   │       ├── newsmtsc-train-and-test-mt/
│   │       │   ├── devtest_mtsc_only.jsonl
│   │       │   └── train.jsonl
│   │       ├── newsmtsc-train-and-test-rw/
│   │       │   ├── devtest_mtsc_and_single_primaries.jsonl
│   │       │   └── train.jsonl
│   │       ├── semeval14laptops/
│   │       │   ├── Laptops_Test_Gold.xml.seg.jsonl
│   │       │   └── Laptops_Train.xml.seg.jsonl
│   │       └── semeval14restaurants/
│   │           ├── Restaurants_Test_Gold.xml.seg.jsonl
│   │           └── Restaurants_Train.xml.seg.jsonl
│   ├── converter_huggingface.py
│   ├── createoverview.py
│   ├── customexceptions.py
│   ├── dataset.py
│   ├── diskdict.py
│   ├── download.py
│   ├── earlystopping.py
│   ├── evaluator.py
│   ├── experiments/
│   │   └── default/
│   │       └── datasets/
│   │           ├── newsmtsc-mt/
│   │           │   ├── dev.jsonl
│   │           │   ├── test.jsonl
│   │           │   └── train.jsonl
│   │           ├── newsmtsc-mt-hf/
│   │           │   ├── dev.jsonl
│   │           │   ├── test.jsonl
│   │           │   └── train.jsonl
│   │           ├── newsmtsc-rw/
│   │           │   ├── dev.jsonl
│   │           │   ├── test.jsonl
│   │           │   └── train.jsonl
│   │           └── newsmtsc-rw-hf/
│   │               ├── dev.jsonl
│   │               ├── test.jsonl
│   │               └── train.jsonl
│   ├── fxlogger.py
│   ├── infer.py
│   ├── inferrest.py
│   ├── knowledge/
│   │   ├── __init__.py
│   │   ├── bingliuopinion/
│   │   │   ├── bingliuopinion.py
│   │   │   ├── converter.py
│   │   │   ├── license.txt
│   │   │   ├── negative-words.txt
│   │   │   ├── opinion_polarity.ddict
│   │   │   └── positive-words.txt
│   │   ├── knowledgeutils.py
│   │   ├── liwc/
│   │   │   ├── data/
│   │   │   │   ├── .gitignore
│   │   │   │   └── readme.txt
│   │   │   ├── dic.py
│   │   │   ├── liwc.py
│   │   │   ├── liwchelper.py
│   │   │   └── trie.py
│   │   ├── mpqasubjectivity/
│   │   │   ├── converter.py
│   │   │   ├── mpqasubjectivity.py
│   │   │   ├── subjclueslen1-HLTEMNLP05.tff
│   │   │   └── subjclueslen1-HLTEMNLP05.tff.ddict
│   │   ├── nrcemolex/
│   │   │   ├── NRC-Emotion-Lexicon-Wordlevel-v0.92.txt
│   │   │   ├── NRC-Emotion-Lexicon-Wordlevel-v0.92.txt.ddict
│   │   │   ├── converter.py
│   │   │   └── nrcemolex.py
│   │   └── zeros/
│   │       └── zerosknowledge.py
│   ├── layers/
│   │   ├── AggregatorForBert.py
│   │   ├── __init__.py
│   │   ├── attention.py
│   │   ├── dynamic_rnn.py
│   │   ├── point_wise_feed_forward.py
│   │   ├── pytorchnlpattention.py
│   │   └── squeeze_embedding.py
│   ├── losses/
│   │   ├── __init__.py
│   │   ├── crossentropycrossweight.py
│   │   ├── crossentropylosslsr.py
│   │   ├── crossentropylosswithconfidence.py
│   │   └── seq2seqloss.py
│   ├── models/
│   │   ├── FXBaseModel.py
│   │   ├── FXEnsemble.py
│   │   ├── __init__.py
│   │   ├── ensemble.py
│   │   ├── ensembleb.py
│   │   ├── multitargets/
│   │   │   ├── __init__.py
│   │   │   ├── contrasting.py
│   │   │   ├── random_multi.py
│   │   │   ├── seq2seq.py
│   │   │   ├── seq2seq_without_targetmask.py
│   │   │   ├── tdbertlikemultitarget.py
│   │   │   └── tdbertlikemultitarget_dense.py
│   │   └── singletarget/
│   │       ├── __init__.py
│   │       ├── aen.py
│   │       ├── grutscsingle.py
│   │       ├── lcf.py
│   │       ├── lcf2.py
│   │       ├── lcfs.py
│   │       ├── lcfst.py
│   │       ├── lcft.py
│   │       ├── notargetcls.py
│   │       ├── random_single.py
│   │       ├── spc.py
│   │       ├── td_bert.py
│   │       ├── td_bert_qa.py
│   │       └── tdbertlikesingle.py
│   ├── plotter_utils.py
│   ├── pretrained_models/
│   │   ├── .gitignore
│   │   └── state_dicts/
│   │       └── .gitignore
│   ├── results/
│   │   └── .gitignore
│   └── train.py
├── README.md
├── READMEpypi.md
├── hubconf.py
├── pyproject.toml
├── pythoninfo.md
└── setup.cfg
Download .txt
SYMBOL INDEX (416 symbols across 62 files)

FILE: NewsSentiment/DatasetPreparer.py
  class DatasetPreparer (line 20) | class DatasetPreparer:
    method __init__ (line 21) | def __init__(self, name, basepath_datasets, task_format, human, non_hu...
    method get_filepath_by_name (line 64) | def get_filepath_by_name(self, filename):
    method file_to_dictlst (line 67) | def file_to_dictlst(self, filepath):
    method files_to_dictlst (line 75) | def files_to_dictlst(self, list_filepaths):
    method create_slices (line 81) | def create_slices(self, data_type):
    method merge_slices (line 122) | def merge_slices(self):
    method _get_label_counts (line 138) | def _get_label_counts(self, tasks):
    method print_set_info (line 153) | def print_set_info(self):
    method init_set (line 193) | def init_set(self, sets_info):
    method export (line 250) | def export(self, savepath):
    method poltsanews_rel801010_allhuman (line 275) | def poltsanews_rel801010_allhuman(cls, basepath):
    method poltsanews_crossval8010_allhuman (line 299) | def poltsanews_crossval8010_allhuman(cls, basepath):
    method acl14twitter (line 322) | def acl14twitter(cls, basepath):
    method semeval14laptops (line 346) | def semeval14laptops(cls, basepath):
    method semeval14restaurants (line 370) | def semeval14restaurants(cls, basepath):
    method newsmtsc_devtest_mt (line 394) | def newsmtsc_devtest_mt(cls, basepath):
    method newsmtsc_devtest_rw (line 417) | def newsmtsc_devtest_rw(cls, basepath):

FILE: NewsSentiment/SentimentClasses.py
  class SentimentClasses (line 4) | class SentimentClasses:
    method initialize (line 10) | def initialize(sentiment_classes: dict):
    method get_num_classes (line 14) | def get_num_classes():
    method __evaluate_boundary (line 18) | def __evaluate_boundary(given_value: float, boundary: tuple):
    method __evaluate_boundaries_of_class (line 35) | def __evaluate_boundaries_of_class(
    method __get_legacy_information (line 46) | def __get_legacy_information():
    method get_sorted_expected_label_names (line 73) | def get_sorted_expected_label_names():
    method get_sorted_expected_label_values (line 79) | def get_sorted_expected_label_values():
    method get_polarity_associations (line 85) | def get_polarity_associations():
    method get_polarity_associations_inverse (line 89) | def get_polarity_associations_inverse():
    method __find_sentiment_class (line 93) | def __find_sentiment_class(polarity: float):
    method polarity2label (line 114) | def polarity2label(polarity: float) -> str:
    method polarity2normalized_polarity (line 123) | def polarity2normalized_polarity(polarity: float) -> int:
    method Sentiment3ForNewsMtsc (line 132) | def Sentiment3ForNewsMtsc():
    method SentimentStrong3ForNewsMtsc (line 147) | def SentimentStrong3ForNewsMtsc():
    method SentimentWeak3ForNewsMtsc (line 162) | def SentimentWeak3ForNewsMtsc():

FILE: NewsSentiment/consts.py
  function set_default_lm (line 11) | def set_default_lm(new_name: str):
  function get_default_lm (line 16) | def get_default_lm():

FILE: NewsSentiment/controller.py
  function start_worker (line 59) | def start_worker(
  function on_task_done (line 94) | def on_task_done(x):
  function on_task_error (line 103) | def on_task_error(x):
  function get_experiment_result_detailed (line 112) | def get_experiment_result_detailed(experiment_path):
  class SetupController (line 125) | class SetupController:
    method __init__ (line 126) | def __init__(self, options):
    method _apply_conditions (line 379) | def _apply_conditions(self, combinations, args_names_ordered, conditio...
    method _check_conditions (line 425) | def _check_conditions(self, arg_name, full_named_combination, conditio...
    method _build_args (line 452) | def _build_args(self, named_args):
    method _add_arg (line 459) | def _add_arg(self, args_list, name, value):
    method _prepare_experiment_env (line 464) | def _prepare_experiment_env(self, experiment_path):
    method _args_combination_to_single_arg_values (line 468) | def _args_combination_to_single_arg_values(
    method _experiment_named_id_from_named_combination (line 476) | def _experiment_named_id_from_named_combination(self, named_combination):
    method prepare_single_setup (line 479) | def prepare_single_setup(self, named_combination, experiment_id, pool_...
    method run (line 505) | def run(self):
    method _get_best_dev_snem (line 712) | def _get_best_dev_snem(self):
    method _get_running_processes (line 726) | def _get_running_processes(self, running_processes):

FILE: NewsSentiment/converter_huggingface.py
  function convert_polarity (line 12) | def convert_polarity(polarity):
  function convert_target (line 23) | def convert_target(obj, target):
  function convert_obj (line 36) | def convert_obj(obj):
  function convert (line 46) | def convert(path):

FILE: NewsSentiment/createoverview.py
  function rename_flatten (line 15) | def rename_flatten(dictionary, key_prefix):
  function without_keys (line 25) | def without_keys(d, keys):
  function non_scalar_to_str (line 29) | def non_scalar_to_str(d):
  function _find_run_ids (line 43) | def _find_run_ids(completed_tasks: dict):
  function _aggregate_and_mean (line 92) | def _aggregate_and_mean(df: pd.DataFrame):
  function _dfs_to_excel (line 117) | def _dfs_to_excel(pathname, name2df):
  function shelve2xlsx (line 128) | def shelve2xlsx(opt, ignore_graceful_exit_experiments):
  function jsonl2xlsx (line 168) | def jsonl2xlsx(opt):

FILE: NewsSentiment/customexceptions.py
  class TooLongTextException (line 1) | class TooLongTextException(Exception):
  class TargetNotFoundException (line 5) | class TargetNotFoundException(Exception):

FILE: NewsSentiment/dataset.py
  class RandomOversampler (line 60) | class RandomOversampler(torch.utils.data.sampler.Sampler):
    method __init__ (line 61) | def __init__(self, dataset: Dataset, random_seed=None):
    method __len__ (line 85) | def __len__(self):
    method __iter__ (line 88) | def __iter__(self):
  class FXEasyTokenizer (line 92) | class FXEasyTokenizer:
    method __init__ (line 98) | def __init__(
    method _get_labels (line 112) | def _get_labels(cls):
    method create_entire_text (line 127) | def create_entire_text(
    method create_entire_text (line 137) | def create_entire_text(
    method create_entire_text (line 146) | def create_entire_text(
    method prepare_left_segment (line 181) | def prepare_left_segment(text_left: str):
    method prepare_target_mention (line 194) | def prepare_target_mention(target_mention: str):
    method prepare_right_segment (line 203) | def prepare_right_segment(text_right: str):
    method _create_word_to_wordpiece_mapping (line 214) | def _create_word_to_wordpiece_mapping(
    method _batch_create_word_to_wordpiece_mapping (line 222) | def _batch_create_word_to_wordpiece_mapping(
    method _calculate_dep_matrix (line 293) | def _calculate_dep_matrix(self, text_tokens, text_tokens_as_str):
    method _calculate_dep_distance (line 339) | def _calculate_dep_distance(self, text_tokens, text_left_len, target):
    method _create_target_mask (line 414) | def _create_target_mask(
    method _batch_create_target_mask (line 449) | def _batch_create_target_mask(
    method _encode_for_target_mask (line 481) | def _encode_for_target_mask(
    method _create_target_mask_on_encoding (line 503) | def _create_target_mask_on_encoding(
    method _create_knowledge_source_tensor (line 608) | def _create_knowledge_source_tensor(
    method _create_mapping_from_tokenbased_to_wordpiece_based (line 652) | def _create_mapping_from_tokenbased_to_wordpiece_based(self, text, tok...
    method _batch_create_mapping_from_tokenbased_to_wordpiece_based (line 658) | def _batch_create_mapping_from_tokenbased_to_wordpiece_based(self, tex...
    method _convert_non_null_to_one (line 688) | def _convert_non_null_to_one(self, lst):
    method _map_token_index_to_wordpiece_index (line 697) | def _map_token_index_to_wordpiece_index(self, a, b):
    method _create_dependency_tensor (line 703) | def _create_dependency_tensor(
    method _create_dependency_tree_hop_distances_of_tokens_to_target (line 765) | def _create_dependency_tree_hop_distances_of_tokens_to_target(
    method create_model_input_seqs (line 819) | def create_model_input_seqs(
    method batch_create_model_input_seqs (line 847) | def batch_create_model_input_seqs(
    method batch_create_model_input_seqs (line 855) | def batch_create_model_input_seqs(
    method batch_create_model_input_seqs (line 862) | def batch_create_model_input_seqs(
    method _create_coreferential_target_masks (line 1120) | def _create_coreferential_target_masks(
    method _batch_create_coreferential_target_masks (line 1127) | def _batch_create_coreferential_target_masks(
    method _merge_coref_target_masks_into_preferred_target_mask (line 1154) | def _merge_coref_target_masks_into_preferred_target_mask(
  class FXDataset (line 1184) | class FXDataset(Dataset):
    method __init__ (line 1189) | def __init__(
    method __prepare_text_field (line 1258) | def __prepare_text_field(self, text: str):
    method __create_target_text_components (line 1267) | def __create_target_text_components(
    method __parse_dataset_row (line 1293) | def __parse_dataset_row(self, task, ignore_parsing_errors):
    method _create_target_inputs (line 1335) | def _create_target_inputs(
    method _create_fillup_target (line 1430) | def _create_fillup_target(self):
    method _get_as_list (line 1442) | def _get_as_list(self, lst_inputs_of_targets: List[dict], key: str):
    method _get_values_as_lists_in_dict (line 1455) | def _get_values_as_lists_in_dict(
    method _convert_multi_targets_in_single_item_to_single_target_in_multi_items (line 1463) | def _convert_multi_targets_in_single_item_to_single_target_in_multi_it...
    method _convert_multi_targets_in_single_item_to_k_targets_in_multi_items (line 1482) | def _convert_multi_targets_in_single_item_to_k_targets_in_multi_items(
    method _create_item_for_model (line 1549) | def _create_item_for_model(self, example_id, text, targets):
    method create_virtual_target_from_target_mention (line 1614) | def create_virtual_target_from_target_mention(self, target, mention, t...
    method _expand_coref_mentions_of_targets_to_multiple_targets (line 1636) | def _expand_coref_mentions_of_targets_to_multiple_targets(
    method task_to_dataset_item (line 1652) | def task_to_dataset_item(self, task, coref_mode: str, ignore_parsing_e...
    method __getitem__ (line 1704) | def __getitem__(self, index):
    method __len__ (line 1707) | def __len__(self):
    method set_params2index (line 1711) | def set_params2index(params2index: dict):
    method get_input_by_params (line 1719) | def get_input_by_params(inputs: List, weight_name: str, field_name: str):
    method get_all_inputs_for_model (line 1739) | def get_all_inputs_for_model(inputs: List, model_class: FXBaseModel):
    method _stack_target_inputs (line 1747) | def _stack_target_inputs(self, lst_inputs_of_targets: List[dict]) -> d...
    method _stack_special_field (line 1793) | def _stack_special_field(self, key: str, lst_inputs_of_targets: List[d...
    method _stack_or_create_tensor (line 1821) | def _stack_or_create_tensor(self, lst_values: List):

FILE: NewsSentiment/diskdict.py
  class DiskDict (line 10) | class DiskDict(dict):
    method __init__ (line 11) | def __init__(self, sync_path: Union[Path, str]):
    method sync_to_disk (line 24) | def sync_to_disk(self):

FILE: NewsSentiment/download.py
  class Download (line 12) | class Download:
    method __init__ (line 14) | def __init__(
    method list_versions (line 40) | def list_versions(model_cls, own_model_name=""):
    method download (line 53) | def download(cls, model_cls, version=None, force=False, skip_if_exists...
    method model_filename (line 67) | def model_filename(model_cls, version=None):
    method model_path (line 76) | def model_path(cls, model_cls, version=None):
    method add_subparser (line 83) | def add_subparser(subparser):
    method run_from_parser (line 105) | def run_from_parser(cls, args_namespace):

FILE: NewsSentiment/earlystopping.py
  class EarlyStopping (line 8) | class EarlyStopping:
    method __init__ (line 11) | def __init__(self, patience=2, delta=0.01):
    method __call__ (line 29) | def __call__(self, dev_score):

FILE: NewsSentiment/evaluator.py
  class Evaluator (line 14) | class Evaluator:
    method __init__ (line 15) | def __init__(
    method mean_from_all_statistics (line 36) | def mean_from_all_statistics(self, all_test_stats):
    method calc_statistics (line 59) | def calc_statistics(self, y_true, y_pred, y_pred_confidence):
    method print_stats (line 180) | def print_stats(self, stats, description):
    method write_error_table (line 198) | def write_error_table(self, y_true, y_pred, texts_list, filepath):

FILE: NewsSentiment/fxlogger.py
  function get_logger (line 6) | def get_logger():

FILE: NewsSentiment/infer.py
  class TargetSentimentClassifier (line 21) | class TargetSentimentClassifier:
    method __init__ (line 22) | def __init__(
    method infer_from_text (line 73) | def infer_from_text(self, left, target, right):
    method infer (line 89) | def infer(
    method infer (line 104) | def infer(
    method infer (line 119) | def infer(
    method infer (line 133) | def infer(
    method batch_infer (line 221) | def batch_infer(
    method get_info_for_label (line 308) | def get_info_for_label(self, classification_result, label):
  function parse_arguments (line 315) | def parse_arguments(override_args=False):

FILE: NewsSentiment/inferrest.py
  function index (line 11) | def index():
  function start_rest_server (line 22) | def start_rest_server(port=13273):

FILE: NewsSentiment/knowledge/bingliuopinion/bingliuopinion.py
  function get_num_bingliu_polarities (line 14) | def get_num_bingliu_polarities():
  function get_bingliu_polarities_as_tensor (line 18) | def get_bingliu_polarities_as_tensor(term: str):

FILE: NewsSentiment/knowledge/bingliuopinion/converter.py
  function convert_single_txt_to_dict (line 21) | def convert_single_txt_to_dict(path: Path):
  function convert_txt_to_dict (line 32) | def convert_txt_to_dict():

FILE: NewsSentiment/knowledge/knowledgeutils.py
  function find_key_original_or_lc (line 1) | def find_key_original_or_lc(data: dict, data_keys_lower: dict, key: str):

FILE: NewsSentiment/knowledge/liwc/dic.py
  function _parse_categories (line 1) | def _parse_categories(lines):
  function _parse_lexicon (line 17) | def _parse_lexicon(lines, category_mapping):
  function read_dic (line 29) | def read_dic(filepath):

FILE: NewsSentiment/knowledge/liwc/liwc.py
  function get_num_liwc_categories (line 12) | def get_num_liwc_categories():
  function get_liwc_categories_as_tensor (line 16) | def get_liwc_categories_as_tensor(term: str):

FILE: NewsSentiment/knowledge/liwc/liwchelper.py
  function load_token_parser (line 12) | def load_token_parser(filepath="knowledge/liwc/data/LIWC2015_English.dic"):

FILE: NewsSentiment/knowledge/liwc/trie.py
  function build_trie (line 1) | def build_trie(lexicon):
  function search_trie (line 22) | def search_trie(trie, token, token_i=0):

FILE: NewsSentiment/knowledge/mpqasubjectivity/converter.py
  function get_value (line 22) | def get_value(entry_key_value: str):
  function convert_txt_to_dict (line 26) | def convert_txt_to_dict():

FILE: NewsSentiment/knowledge/mpqasubjectivity/mpqasubjectivity.py
  function get_num_mpqa_subjectivity_polarities (line 14) | def get_num_mpqa_subjectivity_polarities():
  function get_mpqa_subjectivity_polarities_as_tensor (line 18) | def get_mpqa_subjectivity_polarities_as_tensor(term: str):

FILE: NewsSentiment/knowledge/nrcemolex/converter.py
  function convert_txt_to_dict (line 27) | def convert_txt_to_dict():

FILE: NewsSentiment/knowledge/nrcemolex/nrcemolex.py
  function get_num_nrc_emotions (line 14) | def get_num_nrc_emotions():
  function get_nrc_emotions_as_tensor (line 18) | def get_nrc_emotions_as_tensor(term: str):

FILE: NewsSentiment/knowledge/zeros/zerosknowledge.py
  function get_num_zero_dimensions (line 4) | def get_num_zero_dimensions():
  function get_zeros_as_tensor (line 13) | def get_zeros_as_tensor(term: str):

FILE: NewsSentiment/layers/AggregatorForBert.py
  class AggregatorForBert (line 5) | class AggregatorForBert(nn.Module):
    method __init__ (line 12) | def __init__(self, spc_lm_representation: str):
    method forward (line 16) | def forward(self, last_hidden_state, pooler_output, all_hidden_states):

FILE: NewsSentiment/layers/attention.py
  class Attention (line 13) | class Attention(nn.Module):
    method __init__ (line 14) | def __init__(
    method reset_parameters (line 52) | def reset_parameters(self):
    method forward (line 57) | def forward(self, k, q):
  class NoQueryAttention (line 103) | class NoQueryAttention(Attention):
    method __init__ (line 106) | def __init__(
    method reset_q (line 123) | def reset_q(self):
    method forward (line 127) | def forward(self, k, **kwargs):
  class FXBertSelfAttention (line 133) | class FXBertSelfAttention(nn.Module):
    method __init__ (line 139) | def __init__(self, hidden_size, num_attention_heads, attention_probs_d...
    method transpose_for_scores (line 157) | def transpose_for_scores(self, x):
    method forward (line 162) | def forward(

FILE: NewsSentiment/layers/dynamic_rnn.py
  class DynamicLSTM (line 11) | class DynamicLSTM(nn.Module):
    method __init__ (line 12) | def __init__(self, input_size, hidden_size, num_layers=1, bias=True, b...
    method forward (line 51) | def forward(self, x, x_len):

FILE: NewsSentiment/layers/point_wise_feed_forward.py
  class PositionwiseFeedForward (line 9) | class PositionwiseFeedForward(nn.Module):
    method __init__ (line 11) | def __init__(self, d_hid, d_inner_hid=None, dropout=0):
    method forward (line 20) | def forward(self, x):

FILE: NewsSentiment/layers/pytorchnlpattention.py
  class ClassicAttention (line 5) | class ClassicAttention(nn.Module):
    method __init__ (line 31) | def __init__(self, dimensions, attention_type="general"):
    method forward (line 45) | def forward(self, query, context):

FILE: NewsSentiment/layers/squeeze_embedding.py
  class SqueezeEmbedding (line 11) | class SqueezeEmbedding(nn.Module):
    method __init__ (line 15) | def __init__(self, batch_first=True):
    method forward (line 19) | def forward(self, x, x_len):

FILE: NewsSentiment/losses/crossentropycrossweight.py
  class CrossEntropyLoss_CrossWeight (line 8) | class CrossEntropyLoss_CrossWeight(nn.Module):
    method __init__ (line 9) | def __init__(self, device, ignore_index, weight=None, crossloss_weight...
    method forward (line 19) | def forward(

FILE: NewsSentiment/losses/crossentropylosslsr.py
  class CrossEntropyLoss_LSR (line 9) | class CrossEntropyLoss_LSR(nn.Module):
    method __init__ (line 10) | def __init__(self, device, smoothing_value=0.2, weight=None):
    method _create_smooth_one_hot_for_true_targets (line 17) | def _create_smooth_one_hot_for_true_targets(
    method forward (line 67) | def forward(

FILE: NewsSentiment/losses/crossentropylosswithconfidence.py
  class CrossEntropyLossWithConfidence (line 5) | class CrossEntropyLossWithConfidence(nn.Module):
    method __init__ (line 6) | def __init__(self, weight, ignore_index):
    method forward (line 14) | def forward(self, predictions: torch.Tensor, labels: torch.Tensor):

FILE: NewsSentiment/losses/seq2seqloss.py
  class SequenceLoss (line 7) | class SequenceLoss(nn.Module):
    method __init__ (line 12) | def __init__(self, device, weight):
    method forward (line 22) | def forward(

FILE: NewsSentiment/models/FXBaseModel.py
  class FXBaseModel (line 20) | class FXBaseModel(PreTrainedModel):
    method __init__ (line 21) | def __init__(self, *args, **kwargs):
    method get_language_models (line 26) | def get_language_models():
    method get_input_field_ids (line 31) | def get_input_field_ids():
    method invoke_language_model (line 34) | def invoke_language_model(self, lm, input_ids, token_type_ids=None):
  function provide_pretrained (line 59) | def provide_pretrained(version, pretrained_url):
  function default_pretrained (line 80) | def default_pretrained(version):
  function model_includes_pretrained (line 104) | def model_includes_pretrained(model):
  function __get_pretrained_wrapper_class (line 122) | def __get_pretrained_wrapper_class(base_class):

FILE: NewsSentiment/models/FXEnsemble.py
  class FXEnsemble (line 12) | class FXEnsemble(FXBaseModel):
    method get_language_models (line 14) | def get_language_models():
    method get_input_field_ids (line 22) | def get_input_field_ids():
    method __init__ (line 32) | def __init__(self, transformer_models: Dict, opt: Namespace):
    method _combine_text_out_with_target_mask (line 56) | def _combine_text_out_with_target_mask(
    method forward (line 68) | def forward(self, inputs: List):

FILE: NewsSentiment/models/ensemble.py
  class EnsembleTopA (line 11) | class EnsembleTopA(FXBaseModel):
    method get_language_models (line 13) | def get_language_models():
    method get_input_field_ids (line 17) | def get_input_field_ids():
    method __init__ (line 32) | def __init__(self, transformer_models: Dict, opt: Namespace):
    method forward (line 50) | def forward(self, inputs: List):

FILE: NewsSentiment/models/ensembleb.py
  class EnsembleTopB (line 11) | class EnsembleTopB(FXBaseModel):
    method get_language_models (line 13) | def get_language_models():
    method get_input_field_ids (line 17) | def get_input_field_ids():
    method __init__ (line 32) | def __init__(self, transformer_models: Dict, opt: Namespace):
    method forward (line 46) | def forward(self, inputs: List):

FILE: NewsSentiment/models/multitargets/contrasting.py
  class Contrasting (line 12) | class Contrasting(FXBaseModel):
    method get_language_models (line 25) | def get_language_models():
    method get_input_field_ids (line 29) | def get_input_field_ids():
    method __init__ (line 35) | def __init__(self, transformer_models: Dict, opt: Namespace):
    method forward (line 45) | def forward(self, inputs):

FILE: NewsSentiment/models/multitargets/random_multi.py
  class RandomMulti (line 12) | class RandomMulti(FXBaseModel):
    method get_language_models (line 18) | def get_language_models():
    method get_input_field_ids (line 27) | def get_input_field_ids():
    method __init__ (line 33) | def __init__(self, transformer_models: Dict, opt: Namespace):
    method forward (line 37) | def forward(self, inputs):

FILE: NewsSentiment/models/multitargets/seq2seq.py
  class SeqTwoSeq (line 12) | class SeqTwoSeq(FXBaseModel):
    method get_language_models (line 19) | def get_language_models():
    method get_input_field_ids (line 23) | def get_input_field_ids():
    method __init__ (line 29) | def __init__(self, transformer_models: Dict, opt: Namespace):
    method forward (line 42) | def forward(self, inputs):

FILE: NewsSentiment/models/multitargets/seq2seq_without_targetmask.py
  class SeqTwoSeqWithoutTargetMask (line 12) | class SeqTwoSeqWithoutTargetMask(FXBaseModel):
    method get_language_models (line 19) | def get_language_models():
    method get_input_field_ids (line 23) | def get_input_field_ids():
    method __init__ (line 29) | def __init__(self, transformer_models: Dict, opt: Namespace):
    method forward (line 41) | def forward(self, inputs):

FILE: NewsSentiment/models/multitargets/tdbertlikemultitarget.py
  class TDBertLikeMultiTarget (line 11) | class TDBertLikeMultiTarget(FXBaseModel):
    method get_language_models (line 24) | def get_language_models():
    method get_input_field_ids (line 28) | def get_input_field_ids():
    method __init__ (line 38) | def __init__(self, transformer_models: Dict, opt: Namespace):
    method forward (line 46) | def forward(self, inputs):

FILE: NewsSentiment/models/multitargets/tdbertlikemultitarget_dense.py
  class TDBertLikeMultiTargetDense (line 11) | class TDBertLikeMultiTargetDense(FXBaseModel):
    method get_language_models (line 24) | def get_language_models():
    method get_input_field_ids (line 28) | def get_input_field_ids():
    method __init__ (line 34) | def __init__(self, transformer_models: Dict, opt: Namespace):
    method forward (line 45) | def forward(self, inputs):

FILE: NewsSentiment/models/singletarget/aen.py
  class AEN_Base (line 20) | class AEN_Base(FXBaseModel):
    method get_language_models (line 22) | def get_language_models():
    method get_input_field_ids (line 26) | def get_input_field_ids():
    method __init__ (line 33) | def __init__(self, transformer_models: Dict, opt: Namespace):
    method apply_lm (line 70) | def apply_lm(self, _input, _input_attention=None):
    method forward (line 113) | def forward(self, inputs):

FILE: NewsSentiment/models/singletarget/grutscsingle.py
  class GRUTSCSingle (line 21) | class GRUTSCSingle(FXBaseModel):
    method get_language_models (line 37) | def get_language_models():
    method get_input_field_ids (line 41) | def get_input_field_ids():
    method __init__ (line 60) | def __init__(
    method forward (line 96) | def forward(self, inputs, is_return_ensemble_values: bool = False):

FILE: NewsSentiment/models/singletarget/lcf.py
  class GlobalContext (line 15) | class GlobalContext(nn.Module):
    method __init__ (line 16) | def __init__(self, global_context_seqs_per_doc):
    method forward (line 20) | def forward(self, inputs):
  class SelfAttention (line 24) | class SelfAttention(nn.Module):
    method __init__ (line 25) | def __init__(self, config, opt):
    method forward (line 32) | def forward(self, inputs):
  class LCF_BERT (line 41) | class LCF_BERT(FXBaseModel):
    method get_language_models (line 43) | def get_language_models():
    method get_input_field_ids (line 47) | def get_input_field_ids():
    method __init__ (line 59) | def __init__(self, transformer_models: Dict, opt: Namespace):
    method feature_dynamic_mask (line 86) | def feature_dynamic_mask(self, text_local_indices, aspect_indices):
    method feature_dynamic_weighted (line 119) | def feature_dynamic_weighted(self, text_local_indices, aspect_indices):
    method forward (line 152) | def forward(self, inputs):

FILE: NewsSentiment/models/singletarget/lcf2.py
  class GlobalContext (line 18) | class GlobalContext(nn.Module):
    method __init__ (line 19) | def __init__(self, global_context_seqs_per_doc):
    method forward (line 23) | def forward(self, inputs):
  class SelfAttention (line 27) | class SelfAttention(nn.Module):
    method __init__ (line 28) | def __init__(self, config, opt):
    method forward (line 39) | def forward(self, inputs):
  class LCF_BERT2Dual (line 48) | class LCF_BERT2Dual(FXBaseModel):
    method get_language_models (line 57) | def get_language_models():
    method get_input_field_ids (line 61) | def get_input_field_ids():
    method __init__ (line 73) | def __init__(self, transformer_models: Dict, opt: Namespace):
    method feature_dynamic_mask (line 94) | def feature_dynamic_mask(self, text_local_indices, aspect_indices):
    method feature_dynamic_weighted (line 127) | def feature_dynamic_weighted(self, text_local_indices, aspect_indices):
    method forward (line 160) | def forward(self, inputs):

FILE: NewsSentiment/models/singletarget/lcfs.py
  class PointwiseFeedForward (line 16) | class PointwiseFeedForward(nn.Module):
    method __init__ (line 21) | def __init__(self, d_hid, d_inner_hid=None, d_out=None, dropout=0):
    method forward (line 32) | def forward(self, x):
  class SelfAttention (line 39) | class SelfAttention(nn.Module):
    method __init__ (line 40) | def __init__(self, config, opt):
    method forward (line 47) | def forward(self, inputs):
  class LCFS_BERT (line 56) | class LCFS_BERT(FXBaseModel):
    method get_language_models (line 58) | def get_language_models():
    method get_input_field_ids (line 62) | def get_input_field_ids():
    method __init__ (line 75) | def __init__(self, transformer_models: Dict, opt: Namespace):
    method feature_dynamic_mask (line 102) | def feature_dynamic_mask(self, text_local_indices, aspect_indices, dis...
    method feature_dynamic_weighted (line 148) | def feature_dynamic_weighted(
    method forward (line 201) | def forward(self, inputs):

FILE: NewsSentiment/models/singletarget/lcfst.py
  class PointwiseFeedForward (line 17) | class PointwiseFeedForward(nn.Module):
    method __init__ (line 22) | def __init__(self, d_hid, d_inner_hid=None, d_out=None, dropout=0):
    method forward (line 33) | def forward(self, x):
  class SelfAttention (line 40) | class SelfAttention(nn.Module):
    method __init__ (line 41) | def __init__(self, config, opt):
    method forward (line 48) | def forward(self, inputs):
  class LCFST_BERT (line 57) | class LCFST_BERT(FXBaseModel):
    method get_language_models (line 59) | def get_language_models():
    method get_input_field_ids (line 63) | def get_input_field_ids():
    method __init__ (line 77) | def __init__(self, transformer_models: Dict, opt: Namespace):
    method feature_dynamic_mask (line 108) | def feature_dynamic_mask(self, text_local_indices, aspect_indices, dis...
    method feature_dynamic_weighted (line 154) | def feature_dynamic_weighted(
    method forward (line 207) | def forward(self, inputs):

FILE: NewsSentiment/models/singletarget/lcft.py
  class PointwiseFeedForward (line 16) | class PointwiseFeedForward(nn.Module):
    method __init__ (line 21) | def __init__(self, d_hid, d_inner_hid=None, d_out=None, dropout=0):
    method forward (line 32) | def forward(self, x):
  class SelfAttention (line 39) | class SelfAttention(nn.Module):
    method __init__ (line 40) | def __init__(self, config, opt):
    method forward (line 47) | def forward(self, inputs):
  class LCFT_BERT (line 56) | class LCFT_BERT(FXBaseModel):
    method get_language_models (line 58) | def get_language_models():
    method get_input_field_ids (line 62) | def get_input_field_ids():
    method __init__ (line 75) | def __init__(self, transformer_models: Dict, opt: Namespace):
    method feature_dynamic_mask (line 106) | def feature_dynamic_mask(self, text_local_indices, aspect_indices, dis...
    method feature_dynamic_weighted (line 152) | def feature_dynamic_weighted(
    method forward (line 205) | def forward(self, inputs):

FILE: NewsSentiment/models/singletarget/notargetcls.py
  class NoTargetClsBert (line 12) | class NoTargetClsBert(FXBaseModel):
    method get_language_models (line 14) | def get_language_models():
    method get_input_field_ids (line 18) | def get_input_field_ids():
    method __init__ (line 24) | def __init__(self, transformer_models: Dict, opt: Namespace):
    method forward (line 33) | def forward(self, inputs):

FILE: NewsSentiment/models/singletarget/random_single.py
  class RandomSingle (line 12) | class RandomSingle(FXBaseModel):
    method get_language_models (line 18) | def get_language_models():
    method get_input_field_ids (line 27) | def get_input_field_ids():
    method __init__ (line 33) | def __init__(self, transformer_models: Dict, opt: Namespace):
    method forward (line 37) | def forward(self, inputs):

FILE: NewsSentiment/models/singletarget/spc.py
  class SPC_Base (line 12) | class SPC_Base(FXBaseModel):
    method get_language_models (line 14) | def get_language_models():
    method get_input_field_ids (line 18) | def get_input_field_ids():
    method __init__ (line 28) | def __init__(self, transformer_models: Dict, opt: Namespace):
    method forward (line 37) | def forward(self, inputs):

FILE: NewsSentiment/models/singletarget/td_bert.py
  class TD_BERT (line 18) | class TD_BERT(FXBaseModel):
    method get_language_models (line 20) | def get_language_models():
    method get_input_field_ids (line 24) | def get_input_field_ids():
    method __init__ (line 30) | def __init__(self, transformer_models: Dict, opt: Namespace):
    method forward (line 37) | def forward(self, inputs, is_return_ensemble_values: bool = False):

FILE: NewsSentiment/models/singletarget/td_bert_qa.py
  class TD_BERT_QA_MUL (line 14) | class TD_BERT_QA_MUL(FXBaseModel):
    method get_language_models (line 16) | def get_language_models():
    method get_input_field_ids (line 20) | def get_input_field_ids():
    method __init__ (line 26) | def __init__(self, transformer_models: Dict, opt: Namespace):
    method forward (line 34) | def forward(self, inputs):
  class TD_BERT_QA_CON (line 75) | class TD_BERT_QA_CON(FXBaseModel):
    method get_language_models (line 77) | def get_language_models():
    method get_input_field_ids (line 81) | def get_input_field_ids():
    method __init__ (line 87) | def __init__(self, transformer_models: Dict, opt: Namespace):
    method forward (line 95) | def forward(self, inputs):

FILE: NewsSentiment/models/singletarget/tdbertlikesingle.py
  class TDBertLikeSingle (line 12) | class TDBertLikeSingle(FXBaseModel):
    method get_language_models (line 27) | def get_language_models():
    method get_input_field_ids (line 31) | def get_input_field_ids():
    method __init__ (line 37) | def __init__(self, transformer_models: Dict, opt: Namespace):
    method forward (line 45) | def forward(self, inputs):

FILE: NewsSentiment/plotter_utils.py
  function create_save_plotted_confusion_matrix (line 12) | def create_save_plotted_confusion_matrix(conf_matrix, expected_labels, b...
  function plot_confusion_matrix (line 19) | def plot_confusion_matrix(cm, classes, normalize=False, title=None, cmap...

FILE: NewsSentiment/train.py
  class Instructor (line 117) | class Instructor:
    method __init__ (line 118) | def __init__(self, opt):
    method _load_dataset (line 183) | def _load_dataset(self, path, coref_mode):
    method load_datasets (line 197) | def load_datasets(self):
    method _print_args (line 223) | def _print_args(self):
    method create_transformer_model (line 240) | def create_transformer_model(
    method _reset_params_of_own_model (line 279) | def _reset_params_of_own_model(self):
    method _create_prepare_model_path_to_store_state_dict (line 292) | def _create_prepare_model_path_to_store_state_dict(self, snem, epoch):
    method select_inputs (line 308) | def select_inputs(self, sample_batched, is_single_item=False):
    method _train (line 344) | def _train(self, criterion, optimizer, train_data_loader, dev_data_loa...
    method _intraining_evaluation_and_model_save (line 528) | def _intraining_evaluation_and_model_save(
    method save_pretrained_model (line 555) | def save_pretrained_model(
    method _save_model_state_dict (line 573) | def _save_model_state_dict(self, early_stopping, epoch: int, dev_stats):
    method _get_classes_from_sequence_output (line 654) | def _get_classes_from_sequence_output(
    method _evaluate (line 701) | def _evaluate(self, data_loader, get_examples=False, basepath=None):
    method get_normalized_inv_class_frequencies (line 787) | def get_normalized_inv_class_frequencies(self):
    method _is_random_model (line 799) | def _is_random_model(self):
    method run (line 802) | def run(self):
    method get_serializable_stats (line 892) | def get_serializable_stats(self, stats):
    method get_serializable_opts (line 898) | def get_serializable_opts(self):
    method perform_post_training_actions (line 906) | def perform_post_training_actions(
  function str2bool (line 968) | def str2bool(v):
  function _setup_cuda (line 979) | def _setup_cuda(opt):
  function _die_gracefully (line 1008) | def _die_gracefully(reason: str):
  function check_arguments (line 1015) | def check_arguments(opt):
  function post_process_arguments (line 1080) | def post_process_arguments(opt):
  function prepare_and_start_instructor (line 1118) | def prepare_and_start_instructor(opt):
  function parse_arguments (line 1222) | def parse_arguments(override_args=False, overwrite_logging_level=None):
Copy disabled (too large) Download .json
Condensed preview — 126 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (34,819K chars).
[
  {
    "path": ".gitignore",
    "chars": 3266,
    "preview": "# Created by .ignore support plugin (hsz.mobi)\n### Python template\n# Byte-compiled / optimized / DLL files\n__pycache__/\n"
  },
  {
    "path": ".idea/.gitignore",
    "chars": 176,
    "preview": "# Default ignored files\n/shelf/\n/workspace.xml\n# Datasource local storage ignored files\n/dataSources/\n/dataSources.local"
  },
  {
    "path": ".idea/NewsMTSC.iml",
    "chars": 521,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<module type=\"JAVA_MODULE\" version=\"4\">\n  <component name=\"NewModuleRootManager\" "
  },
  {
    "path": ".idea/misc.xml",
    "chars": 268,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"PhpWorkspaceProjectConfiguration\" backwa"
  },
  {
    "path": ".idea/modules.xml",
    "chars": 268,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"ProjectModuleManager\">\n    <modules>\n   "
  },
  {
    "path": ".idea/vcs.xml",
    "chars": 167,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project version=\"4\">\n  <component name=\"VcsDirectoryMappings\">\n    <mapping dire"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "chars": 3226,
    "preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, w"
  },
  {
    "path": "LICENSE",
    "chars": 1394,
    "preview": "This project uses code from various projects, who may have their own license or copyright.\n- ABSA-PyTorch by Yury Soong "
  },
  {
    "path": "MANIFEST.in",
    "chars": 44,
    "preview": "include READMEpypi.md\ninclude pythoninfo.md\n"
  },
  {
    "path": "NewsSentiment/.gitignore",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "NewsSentiment/DatasetPreparer.py",
    "chars": 15097,
    "preview": "\"\"\"\nUsed by controller.py to prepare datasets for an experiment, thereby most importantly considering whether the experi"
  },
  {
    "path": "NewsSentiment/SentimentClasses.py",
    "chars": 6379,
    "preview": "from typing import Iterable\n\n\nclass SentimentClasses:\n    FILLUP_POLARITY_VALUE = -100\n    FILLUP_POLARITY_LABEL = \"fill"
  },
  {
    "path": "NewsSentiment/__init__.py",
    "chars": 58,
    "preview": "from NewsSentiment.infer import TargetSentimentClassifier\n"
  },
  {
    "path": "NewsSentiment/__main__.py",
    "chars": 492,
    "preview": "import argparse\n\nfrom NewsSentiment.download import Download\n\nif __name__ == '__main__':\n    parser = argparse.ArgumentP"
  },
  {
    "path": "NewsSentiment/combinations_default.py",
    "chars": 3495,
    "preview": "from NewsSentiment.consts import BERT_BASE_UNCASED\n\ncombinations_default_0 = {\n    \"own_model_name\": [\n        # baselin"
  },
  {
    "path": "NewsSentiment/consts.py",
    "chars": 1737,
    "preview": "BERT_BASE_UNCASED = \"bert-base-uncased\"\nROBERTA_BASE = \"roberta-base\"\nXLNET_BASE_CASED = \"xlnet-base-cased\"\nALBERT_BASE "
  },
  {
    "path": "NewsSentiment/controller.py",
    "chars": 31676,
    "preview": "\"\"\"\nDefinitions:\nsetup: represents a fixed, unique combination of for instance:\n* model, e.g., BERT, DISTILBERT\n* hyper-"
  },
  {
    "path": "NewsSentiment/controller_data/datasets/NewsMTSC-dataset/devtest_mt.jsonl",
    "chars": 409897,
    "preview": "{\"primary_gid\": \"allsides_1002_402_12_former FBI director James B. Comey_51_56\", \"sentence_normalized\": \"While White Hou"
  },
  {
    "path": "NewsSentiment/controller_data/datasets/NewsMTSC-dataset/devtest_rw.jsonl",
    "chars": 444226,
    "preview": "{\"primary_gid\": \"allsides_703_283_55_Mr. Trump_124_133\", \"sentence_normalized\": \"A group of congressional Democrats said"
  },
  {
    "path": "NewsSentiment/controller_data/datasets/NewsMTSC-dataset/readme.md",
    "chars": 3744,
    "preview": "# Welcome\n\nThe files contained in this archive are part of the dataset \"NewsMTSC\" described in our paper \"NewsMTSC: (Mul"
  },
  {
    "path": "NewsSentiment/controller_data/datasets/NewsMTSC-dataset/train.jsonl",
    "chars": 3277842,
    "preview": "{\"primary_gid\": \"allsides_1000_401_25_Reality Leigh Winner_0_6\", \"sentence_normalized\": \"Winner wrote that she had a 30-"
  },
  {
    "path": "NewsSentiment/controller_data/datasets/acl14twitter/test.raw.jsonl",
    "chars": 170068,
    "preview": "{\"primary_gid\": \"-1\", \"sentence_normalized\": \" shaquille o'neal to miss 3rd straight playoff game | the ... : $t$ will m"
  },
  {
    "path": "NewsSentiment/controller_data/datasets/acl14twitter/train.raw.jsonl",
    "chars": 1530068,
    "preview": "{\"primary_gid\": \"-1\", \"sentence_normalized\": \"i agree about arafat . i mean , shit , they even gave one to jimmy carter "
  },
  {
    "path": "NewsSentiment/controller_data/datasets/newsmtsc-train-and-test-mt/devtest_mtsc_only.jsonl",
    "chars": 409897,
    "preview": "{\"primary_gid\": \"allsides_1002_402_12_former FBI director James B. Comey_51_56\", \"sentence_normalized\": \"While White Hou"
  },
  {
    "path": "NewsSentiment/controller_data/datasets/newsmtsc-train-and-test-mt/train.jsonl",
    "chars": 3277842,
    "preview": "{\"primary_gid\": \"allsides_1000_401_25_Reality Leigh Winner_0_6\", \"sentence_normalized\": \"Winner wrote that she had a 30-"
  },
  {
    "path": "NewsSentiment/controller_data/datasets/newsmtsc-train-and-test-rw/devtest_mtsc_and_single_primaries.jsonl",
    "chars": 444226,
    "preview": "{\"primary_gid\": \"allsides_703_283_55_Mr. Trump_124_133\", \"sentence_normalized\": \"A group of congressional Democrats said"
  },
  {
    "path": "NewsSentiment/controller_data/datasets/newsmtsc-train-and-test-rw/train.jsonl",
    "chars": 3277842,
    "preview": "{\"primary_gid\": \"allsides_1000_401_25_Reality Leigh Winner_0_6\", \"sentence_normalized\": \"Winner wrote that she had a 30-"
  },
  {
    "path": "NewsSentiment/controller_data/datasets/semeval14laptops/Laptops_Test_Gold.xml.seg.jsonl",
    "chars": 149845,
    "preview": "{\"primary_gid\": \"-1\", \"sentence_normalized\": \" boot time is super fast , around anywhere from 35 seconds to 1 minute .\","
  },
  {
    "path": "NewsSentiment/controller_data/datasets/semeval14laptops/Laptops_Train.xml.seg.jsonl",
    "chars": 590995,
    "preview": "{\"primary_gid\": \"-1\", \"sentence_normalized\": \"i charge it at night and skip taking the cord with me because of the good "
  },
  {
    "path": "NewsSentiment/controller_data/datasets/semeval14restaurants/Restaurants_Test_Gold.xml.seg.jsonl",
    "chars": 268913,
    "preview": "{\"primary_gid\": \"-1\", \"sentence_normalized\": \"the bread is top notch as well .\", \"targets\": [{\"Input.gid\": \"-1\", \"mentio"
  },
  {
    "path": "NewsSentiment/controller_data/datasets/semeval14restaurants/Restaurants_Train.xml.seg.jsonl",
    "chars": 877363,
    "preview": "{\"primary_gid\": \"-1\", \"sentence_normalized\": \"but the staff was so horrible to us .\", \"targets\": [{\"Input.gid\": \"-1\", \"m"
  },
  {
    "path": "NewsSentiment/converter_huggingface.py",
    "chars": 1709,
    "preview": "\"\"\"\nThis file converts the dataset files (3 splits) into the format we'll use on\nHuggingface Hub, i.e., where examples w"
  },
  {
    "path": "NewsSentiment/createoverview.py",
    "chars": 6007,
    "preview": "import argparse\nimport json\nfrom collections import defaultdict\n\nfrom diskdict import DiskDict\n\nimport jsonlines\nimport "
  },
  {
    "path": "NewsSentiment/customexceptions.py",
    "chars": 101,
    "preview": "class TooLongTextException(Exception):\n    pass\n\n\nclass TargetNotFoundException(Exception):\n    pass\n"
  },
  {
    "path": "NewsSentiment/dataset.py",
    "chars": 74246,
    "preview": "import random\nfrom collections import Counter\nfrom typing import (\n    List,\n    Iterable,\n    Set,\n    Union,\n    Dict,"
  },
  {
    "path": "NewsSentiment/diskdict.py",
    "chars": 841,
    "preview": "from pathlib import Path\nimport pickle\nfrom typing import Union\n\nfrom NewsSentiment.fxlogger import get_logger\n\nlogger ="
  },
  {
    "path": "NewsSentiment/download.py",
    "chars": 3935,
    "preview": "\"\"\"\nDownload a specific version of a finetuned model and place it in pretrained_models.\n\"\"\"\nimport os\nimport string\n\nimp"
  },
  {
    "path": "NewsSentiment/earlystopping.py",
    "chars": 1927,
    "preview": "# taken from https://github.com/Bjarten/early-stopping-pytorch\n# Copyright by Bjarten\n# License: MIT\n\nfrom NewsSentiment"
  },
  {
    "path": "NewsSentiment/evaluator.py",
    "chars": 8248,
    "preview": "from collections import Counter\nfrom statistics import mean\n\nimport jsonlines\nimport numpy as np\nfrom sklearn import met"
  },
  {
    "path": "NewsSentiment/experiments/default/datasets/newsmtsc-mt/dev.jsonl",
    "chars": 123624,
    "preview": "{\"primary_gid\": \"allsides_6250_2689_12_Barack Obama_73_78\", \"sentence_normalized\": \"Both the Gallup and Rasmussen tracki"
  },
  {
    "path": "NewsSentiment/experiments/default/datasets/newsmtsc-mt/test.jsonl",
    "chars": 286273,
    "preview": "{\"primary_gid\": \"allsides_1811_738_0_Hillary_25_32\", \"sentence_normalized\": \"Colin Powell: Everything Hillary Touches Sh"
  },
  {
    "path": "NewsSentiment/experiments/default/datasets/newsmtsc-mt/train.jsonl",
    "chars": 3277842,
    "preview": "{\"primary_gid\": \"allsides_1000_401_25_Reality Leigh Winner_0_6\", \"sentence_normalized\": \"Winner wrote that she had a 30-"
  },
  {
    "path": "NewsSentiment/experiments/default/datasets/newsmtsc-mt-hf/dev.jsonl",
    "chars": 136179,
    "preview": "{\"mention\": \"Obama\", \"polarity\": 1, \"from\": 73, \"to\": 78, \"sentence\": \"Both the Gallup and Rasmussen tracking surveys ha"
  },
  {
    "path": "NewsSentiment/experiments/default/datasets/newsmtsc-mt-hf/test.jsonl",
    "chars": 313577,
    "preview": "{\"mention\": \"Hillary\", \"polarity\": -1, \"from\": 25, \"to\": 32, \"sentence\": \"Colin Powell: Everything Hillary Touches She S"
  },
  {
    "path": "NewsSentiment/experiments/default/datasets/newsmtsc-mt-hf/train.jsonl",
    "chars": 2506388,
    "preview": "{\"mention\": \"Winner\", \"polarity\": 0, \"from\": 0, \"to\": 6, \"sentence\": \"Winner wrote that she had a 30-minute private meet"
  },
  {
    "path": "NewsSentiment/experiments/default/datasets/newsmtsc-rw/dev.jsonl",
    "chars": 135641,
    "preview": "{\"primary_gid\": \"allsides_3447_1422_11_Ted Cruz_88_92\", \"sentence_normalized\": \"In the 2015 Conservative Political Actio"
  },
  {
    "path": "NewsSentiment/experiments/default/datasets/newsmtsc-rw/test.jsonl",
    "chars": 308585,
    "preview": "{\"primary_gid\": \"polusa_v1_4307505_-1_11_Seth_39_43\", \"sentence_normalized\": \"Though we do not know what other items Set"
  },
  {
    "path": "NewsSentiment/experiments/default/datasets/newsmtsc-rw/train.jsonl",
    "chars": 3277842,
    "preview": "{\"primary_gid\": \"allsides_1000_401_25_Reality Leigh Winner_0_6\", \"sentence_normalized\": \"Winner wrote that she had a 30-"
  },
  {
    "path": "NewsSentiment/experiments/default/datasets/newsmtsc-rw-hf/dev.jsonl",
    "chars": 99078,
    "preview": "{\"mention\": \"Cruz\", \"polarity\": 0, \"from\": 88, \"to\": 92, \"sentence\": \"In the 2015 Conservative Political Action Conferen"
  },
  {
    "path": "NewsSentiment/experiments/default/datasets/newsmtsc-rw-hf/test.jsonl",
    "chars": 227869,
    "preview": "{\"mention\": \"Seth\", \"polarity\": 0, \"from\": 39, \"to\": 43, \"sentence\": \"Though we do not know what other items Seth may ha"
  },
  {
    "path": "NewsSentiment/experiments/default/datasets/newsmtsc-rw-hf/train.jsonl",
    "chars": 2506388,
    "preview": "{\"mention\": \"Winner\", \"polarity\": 0, \"from\": 0, \"to\": 6, \"sentence\": \"Winner wrote that she had a 30-minute private meet"
  },
  {
    "path": "NewsSentiment/fxlogger.py",
    "chars": 586,
    "preview": "import logging\n\nlogger = None\n\n\ndef get_logger():\n    global logger\n\n    if not logger:\n        formatter = logging.Form"
  },
  {
    "path": "NewsSentiment/infer.py",
    "chars": 13527,
    "preview": "import argparse\n\nimport torch\nimport torch.nn.functional as F\nfrom math import ceil\nfrom jsonlines import jsonlines\nfrom"
  },
  {
    "path": "NewsSentiment/inferrest.py",
    "chars": 641,
    "preview": "from flask import Flask, request\n\nfrom NewsSentiment import TargetSentimentClassifier\n\napp = Flask(__name__)\n\ntsc = Targ"
  },
  {
    "path": "NewsSentiment/knowledge/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "NewsSentiment/knowledge/bingliuopinion/bingliuopinion.py",
    "chars": 861,
    "preview": "import torch\n\nfrom NewsSentiment.diskdict import DiskDict\nfrom NewsSentiment.knowledge.bingliuopinion.converter import P"
  },
  {
    "path": "NewsSentiment/knowledge/bingliuopinion/converter.py",
    "chars": 1782,
    "preview": "from collections import defaultdict, Counter\nfrom pathlib import Path\nimport csv\nimport os\n\nfrom tqdm import tqdm\n\nfrom "
  },
  {
    "path": "NewsSentiment/knowledge/bingliuopinion/license.txt",
    "chars": 1191,
    "preview": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n;\n; Both files (negative- and positive-word"
  },
  {
    "path": "NewsSentiment/knowledge/bingliuopinion/negative-words.txt",
    "chars": 44757,
    "preview": "2-faced\n2-faces\nabnormal\nabolish\nabominable\nabominably\nabominate\nabomination\nabort\naborted\naborts\nabrade\nabrasive\nabrupt"
  },
  {
    "path": "NewsSentiment/knowledge/bingliuopinion/positive-words.txt",
    "chars": 19092,
    "preview": "a+\nabound\nabounds\nabundance\nabundant\naccessable\naccessible\nacclaim\nacclaimed\nacclamation\naccolade\naccolades\naccommodativ"
  },
  {
    "path": "NewsSentiment/knowledge/knowledgeutils.py",
    "chars": 388,
    "preview": "def find_key_original_or_lc(data: dict, data_keys_lower: dict, key: str):\n    # try to get the key as it is from the dic"
  },
  {
    "path": "NewsSentiment/knowledge/liwc/data/.gitignore",
    "chars": 83,
    "preview": "# Ignore everything in this directory\n*\n# Except this file\n!.gitignore\n!readme.txt\n"
  },
  {
    "path": "NewsSentiment/knowledge/liwc/data/readme.txt",
    "chars": 63,
    "preview": "In order to use LIWC, you need to acquire a license from them.\n"
  },
  {
    "path": "NewsSentiment/knowledge/liwc/dic.py",
    "chars": 1859,
    "preview": "def _parse_categories(lines):\n    \"\"\"\n    Read (category_id, category_name) pairs from the categories section.\n    Each "
  },
  {
    "path": "NewsSentiment/knowledge/liwc/liwc.py",
    "chars": 939,
    "preview": "import torch\n\nfrom NewsSentiment.knowledge.liwc.liwchelper import load_token_parser\n\nparse, category_names = load_token_"
  },
  {
    "path": "NewsSentiment/knowledge/liwc/liwchelper.py",
    "chars": 812,
    "preview": "from .dic import read_dic\nfrom .trie import build_trie, search_trie\n\ntry:\n    import pkg_resources\n\n    __version__ = pk"
  },
  {
    "path": "NewsSentiment/knowledge/liwc/trie.py",
    "chars": 1002,
    "preview": "def build_trie(lexicon):\n    \"\"\"\n    Build a character-trie from the plain pattern_string -> categories_list\n    mapping"
  },
  {
    "path": "NewsSentiment/knowledge/mpqasubjectivity/converter.py",
    "chars": 2197,
    "preview": "import os\nfrom collections import defaultdict, Counter\nfrom pathlib import Path\nimport csv\n\nfrom tqdm import tqdm\n\nfrom "
  },
  {
    "path": "NewsSentiment/knowledge/mpqasubjectivity/mpqasubjectivity.py",
    "chars": 888,
    "preview": "import torch\n\nfrom NewsSentiment.diskdict import DiskDict\nfrom NewsSentiment.knowledge.knowledgeutils import find_key_or"
  },
  {
    "path": "NewsSentiment/knowledge/mpqasubjectivity/subjclueslen1-HLTEMNLP05.tff",
    "chars": 662572,
    "preview": "type=weaksubj len=1 word1=abandoned pos1=adj stemmed1=n priorpolarity=negative\ntype=weaksubj len=1 word1=abandonment pos"
  },
  {
    "path": "NewsSentiment/knowledge/nrcemolex/NRC-Emotion-Lexicon-Wordlevel-v0.92.txt",
    "chars": 2579144,
    "preview": "aback\tanger\t0\naback\tanticipation\t0\naback\tdisgust\t0\naback\tfear\t0\naback\tjoy\t0\naback\tnegative\t0\naback\tpositive\t0\naback\tsadn"
  },
  {
    "path": "NewsSentiment/knowledge/nrcemolex/converter.py",
    "chars": 1530,
    "preview": "import os\nfrom collections import defaultdict, Counter\nfrom pathlib import Path\nimport csv\n\nfrom NewsSentiment.fxlogger "
  },
  {
    "path": "NewsSentiment/knowledge/nrcemolex/nrcemolex.py",
    "chars": 813,
    "preview": "import torch\n\nfrom NewsSentiment.knowledge.knowledgeutils import find_key_original_or_lc\nfrom NewsSentiment.knowledge.nr"
  },
  {
    "path": "NewsSentiment/knowledge/zeros/zerosknowledge.py",
    "chars": 665,
    "preview": "import torch\n\n\ndef get_num_zero_dimensions():\n    # while one dimension would suffice, using only one can cause (especia"
  },
  {
    "path": "NewsSentiment/layers/AggregatorForBert.py",
    "chars": 1903,
    "preview": "import torch.nn as nn\nimport torch\n\n\nclass AggregatorForBert(nn.Module):\n    \"\"\"\n    According to https://huggingface.co"
  },
  {
    "path": "NewsSentiment/layers/__init__.py",
    "chars": 130,
    "preview": "# -*- coding: utf-8 -*-\n# file: __init__.py\n# author: songyouwei <youwei0314@gmail.com>\n# Copyright (C) 2018. All Rights"
  },
  {
    "path": "NewsSentiment/layers/attention.py",
    "chars": 8505,
    "preview": "# -*- coding: utf-8 -*-\n# file: attention.py\n# author: songyouwei <youwei0314@gmail.com> for top two classes, huggingfac"
  },
  {
    "path": "NewsSentiment/layers/dynamic_rnn.py",
    "chars": 3936,
    "preview": "# -*- coding: utf-8 -*-\n# file: dynamic_rnn.py\n# author: songyouwei <youwei0314@gmail.com>\n# Copyright (C) 2018. All Rig"
  },
  {
    "path": "NewsSentiment/layers/point_wise_feed_forward.py",
    "chars": 841,
    "preview": "# -*- coding: utf-8 -*-\n# file: point_wise_feed_forward.py\n# author: songyouwei <youwei0314@gmail.com>\n# Copyright (C) 2"
  },
  {
    "path": "NewsSentiment/layers/pytorchnlpattention.py",
    "chars": 3823,
    "preview": "import torch\nimport torch.nn as nn\n\n# from https://pytorchnlp.readthedocs.io/en/latest/_modules/torchnlp/nn/attention.ht"
  },
  {
    "path": "NewsSentiment/layers/squeeze_embedding.py",
    "chars": 1207,
    "preview": "# -*- coding: utf-8 -*-\n# file: squeeze_embedding.py\n# author: songyouwei <youwei0314@gmail.com>\n# Copyright (C) 2018. A"
  },
  {
    "path": "NewsSentiment/losses/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "NewsSentiment/losses/crossentropycrossweight.py",
    "chars": 5185,
    "preview": "import torch\nimport torch.nn as nn\n\n# CrossEntropyLoss with additional cross weight loss for two targets\nfrom NewsSentim"
  },
  {
    "path": "NewsSentiment/losses/crossentropylosslsr.py",
    "chars": 5355,
    "preview": "# adapted from ABSA-PyTorch\nimport torch\nimport torch.nn as nn\n\n# CrossEntropyLoss for Label Smoothing Regularization\nfr"
  },
  {
    "path": "NewsSentiment/losses/crossentropylosswithconfidence.py",
    "chars": 1359,
    "preview": "import torch.nn as nn\nimport torch\n\n\nclass CrossEntropyLossWithConfidence(nn.Module):\n    def __init__(self, weight, ign"
  },
  {
    "path": "NewsSentiment/losses/seq2seqloss.py",
    "chars": 4719,
    "preview": "import torch\nimport torch.nn as nn\n\nfrom NewsSentiment.SentimentClasses import SentimentClasses\n\n\nclass SequenceLoss(nn."
  },
  {
    "path": "NewsSentiment/models/FXBaseModel.py",
    "chars": 4715,
    "preview": "import os\nfrom copy import copy\n\nimport torch.nn as nn\n\nfrom abc import abstractmethod\n\nfrom transformers import (\n    X"
  },
  {
    "path": "NewsSentiment/models/FXEnsemble.py",
    "chars": 5708,
    "preview": "from abc import ABC\nfrom argparse import Namespace\nfrom typing import List, Dict\nimport torch.nn as nn\nimport torch\n\nfro"
  },
  {
    "path": "NewsSentiment/models/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "NewsSentiment/models/ensemble.py",
    "chars": 2698,
    "preview": "from argparse import Namespace\nfrom typing import List, Dict\nfrom NewsSentiment.consts import *\nimport torch.nn as nn\nim"
  },
  {
    "path": "NewsSentiment/models/ensembleb.py",
    "chars": 2324,
    "preview": "from argparse import Namespace\nfrom typing import List, Dict\nfrom NewsSentiment.consts import *\nimport torch.nn as nn\nim"
  },
  {
    "path": "NewsSentiment/models/multitargets/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "NewsSentiment/models/multitargets/contrasting.py",
    "chars": 3531,
    "preview": "from argparse import Namespace\nfrom typing import Dict\n\nimport torch\nimport torch.nn as nn\n\nfrom NewsSentiment.consts im"
  },
  {
    "path": "NewsSentiment/models/multitargets/random_multi.py",
    "chars": 1308,
    "preview": "from argparse import Namespace\nfrom typing import Dict\n\nimport torch\nimport torch.nn as nn\n\nfrom NewsSentiment.consts im"
  },
  {
    "path": "NewsSentiment/models/multitargets/seq2seq.py",
    "chars": 2901,
    "preview": "from argparse import Namespace\nfrom typing import Dict\n\nimport torch.nn as nn\n\nfrom NewsSentiment.SentimentClasses impor"
  },
  {
    "path": "NewsSentiment/models/multitargets/seq2seq_without_targetmask.py",
    "chars": 2360,
    "preview": "from argparse import Namespace\nfrom typing import Dict\n\nimport torch.nn as nn\n\nfrom NewsSentiment.SentimentClasses impor"
  },
  {
    "path": "NewsSentiment/models/multitargets/tdbertlikemultitarget.py",
    "chars": 5300,
    "preview": "from argparse import Namespace\nfrom typing import Dict\n\nimport torch.nn as nn\n\nfrom NewsSentiment.consts import *\nfrom N"
  },
  {
    "path": "NewsSentiment/models/multitargets/tdbertlikemultitarget_dense.py",
    "chars": 3234,
    "preview": "from argparse import Namespace\nfrom typing import Dict\n\nimport torch.nn as nn\n\nfrom NewsSentiment.consts import *\nfrom N"
  },
  {
    "path": "NewsSentiment/models/singletarget/__init__.py",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "NewsSentiment/models/singletarget/aen.py",
    "chars": 5945,
    "preview": "# adapted from absa-pytorch\nfrom argparse import Namespace\nfrom typing import Dict\n\nimport torch\nimport torch.nn as nn\n\n"
  },
  {
    "path": "NewsSentiment/models/singletarget/grutscsingle.py",
    "chars": 7188,
    "preview": "from argparse import Namespace\nfrom typing import Dict\n\nimport torch\nimport torch.nn as nn\nfrom transformers import Pret"
  },
  {
    "path": "NewsSentiment/models/singletarget/lcf.py",
    "chars": 8184,
    "preview": "# adapted from https://github.com/yangheng95/LCF-ABSA\nfrom argparse import Namespace\nfrom typing import Dict\n\nimport num"
  },
  {
    "path": "NewsSentiment/models/singletarget/lcf2.py",
    "chars": 8313,
    "preview": "# adapted from https://github.com/yangheng95/LC-ABSA/blob/c945a94e0f86116c5578245aa9ad36c46c7b9c4a/models/lc_apc/lcf_ber"
  },
  {
    "path": "NewsSentiment/models/singletarget/lcfs.py",
    "chars": 10011,
    "preview": "# adapted from https://github.com/yangheng95/LCF-ABSA and\n# https://github.com/StevePhan101/LCFS-BERT/\nfrom argparse imp"
  },
  {
    "path": "NewsSentiment/models/singletarget/lcfst.py",
    "chars": 13491,
    "preview": "# adapted from https://github.com/yangheng95/LCF-ABSA and\n# https://github.com/StevePhan101/LCFS-BERT/\nfrom argparse imp"
  },
  {
    "path": "NewsSentiment/models/singletarget/lcft.py",
    "chars": 12285,
    "preview": "# adapted from https://github.com/yangheng95/LCF-ABSA\nfrom argparse import Namespace\nfrom typing import Dict\n\nimport num"
  },
  {
    "path": "NewsSentiment/models/singletarget/notargetcls.py",
    "chars": 1617,
    "preview": "from argparse import Namespace\nfrom typing import Dict\n\nimport torch.nn as nn\n\nfrom NewsSentiment.consts import *\nfrom N"
  },
  {
    "path": "NewsSentiment/models/singletarget/random_single.py",
    "chars": 1310,
    "preview": "from argparse import Namespace\nfrom typing import Dict\n\nimport torch\nimport torch.nn as nn\n\nfrom NewsSentiment.consts im"
  },
  {
    "path": "NewsSentiment/models/singletarget/spc.py",
    "chars": 2336,
    "preview": "from argparse import Namespace\nfrom typing import Dict\n\nimport torch.nn as nn\n\nfrom NewsSentiment.consts import *\nfrom N"
  },
  {
    "path": "NewsSentiment/models/singletarget/td_bert.py",
    "chars": 3238,
    "preview": "# this file re-implements TD-BERT by Gao Zhengjie et al.\n# while this file aims to be conceptually identical to TD-BERT,"
  },
  {
    "path": "NewsSentiment/models/singletarget/td_bert_qa.py",
    "chars": 5184,
    "preview": "# this file re-implements TD-BERT-QA by Gao Zhengjie et al.\nfrom argparse import Namespace\nfrom typing import Dict\n\nimpo"
  },
  {
    "path": "NewsSentiment/models/singletarget/tdbertlikesingle.py",
    "chars": 3881,
    "preview": "from argparse import Namespace\nfrom typing import Dict\n\nimport torch\nimport torch.nn as nn\n\nfrom NewsSentiment.consts im"
  },
  {
    "path": "NewsSentiment/plotter_utils.py",
    "chars": 2615,
    "preview": "import os\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nfrom sklearn.metrics import confusion_matrix\n\nfrom NewsSen"
  },
  {
    "path": "NewsSentiment/pretrained_models/.gitignore",
    "chars": 84,
    "preview": "# Ignore everything in this directory\n*\n# Except this file\n!.gitignore\n!state_dicts\n"
  },
  {
    "path": "NewsSentiment/pretrained_models/state_dicts/.gitignore",
    "chars": 71,
    "preview": "# Ignore everything in this directory\n*\n# Except this file\n!.gitignore\n"
  },
  {
    "path": "NewsSentiment/results/.gitignore",
    "chars": 71,
    "preview": "# Ignore everything in this directory\n*\n# Except this file\n!.gitignore\n"
  },
  {
    "path": "NewsSentiment/train.py",
    "chars": 55410,
    "preview": "import argparse\nimport math\nimport os\nimport random\nimport sys\nimport time\nfrom collections import Counter\nfrom typing i"
  },
  {
    "path": "README.md",
    "chars": 6214,
    "preview": "# NewsMTSC: (Multi-)Target-dependent Sentiment Classification in News Articles\nNewsMTSC is a dataset for target-dependen"
  },
  {
    "path": "READMEpypi.md",
    "chars": 3877,
    "preview": "# NewsSentiment: easy-to-use, high-quality target-dependent sentiment classification for news articles\nNewsSentiment is "
  },
  {
    "path": "hubconf.py",
    "chars": 72,
    "preview": "from NewsSentiment.models.singletarget.grutscsingle import GRUTSCSingle\n"
  },
  {
    "path": "pyproject.toml",
    "chars": 100,
    "preview": "[build-system]\nrequires = [\n  \"setuptools>=45\",\n  \"wheel\"\n]\nbuild-backend = \"setuptools.build_meta\"\n"
  },
  {
    "path": "pythoninfo.md",
    "chars": 632,
    "preview": "This step is optional if you have Python >=3.8, <3.12 installed (run `python --version`\nin a terminal and check the vers"
  },
  {
    "path": "setup.cfg",
    "chars": 1797,
    "preview": "[metadata]\nname = NewsSentiment\nversion = 1.2.28\nauthor = Felix Hamborg\nauthor_email = felix.hamborg@uni-konstanz.de\ndes"
  }
]

// ... and 3 more files (download for full content)

About this extraction

This page contains the full source code of the fhamborg/NewsMTSC GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 126 files (30.6 MB), approximately 8.0M tokens, and a symbol index with 416 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!