public static void main(String[] args) throws Exception {
Options options = new Options();
options.parseOptions(args);
CollectionReader reader = CollectionReaderFactory.createCollectionReader(
XReader.class,
FilesCollectionReader.PARAM_ROOT_FILE,
options.trainDirectory.getPath());
Multiset<Integer> mentionsBetweenCounts = HashMultiset.create();
JCas jCas = JCasFactory.createJCasFromPath("../ctakes-type-system/desc/common_type_system.xml");
while (reader.hasNext()) {
reader.getNext(jCas.getCas());
JCas goldView = jCas.getView(GOLD_VIEW_NAME);
for (BinaryTextRelation relation : JCasUtil.select(goldView, BinaryTextRelation.class)) {
Annotation arg1 = relation.getArg1().getArgument();
Annotation arg2 = relation.getArg2().getArgument();
int mentionsBetween;