All Downloads are FREE. Search and download functionalities are using the official Maven repository.

edu.utah.bmi.nlp.sectiondectector.SpanComparator Maven / Gradle / Ivy

Go to download

SectionDetectorR is a Rule-Based SectionDetector leveraging FastNER for section header detection.

The newest version!
package edu.utah.bmi.nlp.sectiondectector;

import edu.utah.bmi.nlp.core.Span;

import java.util.Comparator;

public class SpanComparator implements Comparator {
    public int compare(Span o1, Span o2) {
        if (o1.getBegin() > o2.getBegin()) {
            return 1;
        } else if (o1.getBegin() < o2.getBegin()) {
            return -1;
        }
        return 0;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy