private static List<Result> generateResultsFromParsingResults(
      InputText inputText, List<AnaphorWithReferent> anaphorsWithReferents) {
    List<Result> results = new ArrayList<>();

    for (AnaphorWithReferent anaphorWithReferent : anaphorsWithReferents) {
      Result result =
          new Result(inputText.getId(), anaphorWithReferent.getAnaphor().getSentence().getId());
      result.setSentenceText(anaphorWithReferent.getAnaphor().getSentence().getText());
      result.setPronoun(anaphorWithReferent.getAnaphor().toString());
      result.setPronounTokenIndex(anaphorWithReferent.getAnaphor().getStartIndex());

      result.setActualReferentStartIndex(anaphorWithReferent.getReferent().getStartIndex());
      result.setActualReferentText(anaphorWithReferent.getReferent().toString());
      result.setActualReferentSentenceId(anaphorWithReferent.getReferent().getSentence().getId());

      results.add(result);
    }

    return results;
  }
  private static void updateResultWithActualReferents(
      Result result,
      List<AnaphorWithReferent> anaphorsWithReferents,
      int sentenceId,
      int pronominalIndex,
      Coref inputPronominal) {
    List<AnaphorWithReferent> anaphorsForSentence =
        getAnaphorsForSentence(anaphorsWithReferents, sentenceId);
    AnaphorWithReferent anaphorByTokenIndex =
        getAnaphorByTokenIndex(anaphorsForSentence, pronominalIndex);

    if (anaphorByTokenIndex == null) {
      result.setActualReferentSentenceId(-1);
      result.setActualReferentStartIndex(-1);
      result.setActualReferentText(null);

      return;
    }

    String actualPronominalText = anaphorByTokenIndex.getAnaphor().toString();
    if (!validateActualPronominal(inputPronominal.toString(), actualPronominalText)) {
      String errorMessage =
          String.format(
              "Actual pronominal wasn't found for: sentence %s token %s",
              result.getSentenceId(), result.getExpectedReferentStartIndex());
      System.err.println(errorMessage);

      return;
    }

    NpTreeInSentence actualReferent = anaphorByTokenIndex.getReferent();
    result.setActualReferentSentenceId(actualReferent.getSentence().getId());

    result.setActualReferentText(actualReferent.toString());

    result.setActualReferentStartIndex(actualReferent.getStartIndex());
  }