Class ExtractIntervalLabels

  • All Implemented Interfaces:
    Runnable, nzilbb.util.MonitorableTask

    public class ExtractIntervalLabels
    extends Task
    Concatenates annotation labels for given labels during given time intervals.
    Author:
    Robert Fromont robert@fromont.net.nz
    • Constructor Detail

      • ExtractIntervalLabels

        public ExtractIntervalLabels()
        Default constructor.
    • Method Detail

      • getDataFile

        public File getDataFile()
        Getter for dataFile: CSV data file
        Returns:
        CSV data file
      • setDataFile

        public ExtractIntervalLabels setDataFile​(File fNewDataFile)
        Setter for dataFile: CSV data file, which will be deleted after processing.
        Parameters:
        fNewDataFile - CSV data file, which will be deleted after processing.
      • getFieldDelimiter

        public char getFieldDelimiter()
        Getter for fieldDelimiter: The field delimiter character for the CSV file.
        Returns:
        The field delimiter character for the CSV file.
      • setFieldDelimiter

        public ExtractIntervalLabels setFieldDelimiter​(char cNewFieldDelimiter)
        Setter for fieldDelimiter: The field delimiter character for the CSV file.
        Parameters:
        cNewFieldDelimiter - The field delimiter character for the CSV file.
      • getTranscriptIdColumn

        public int getTranscriptIdColumn()
        Getter for transcriptIdColumn: Colum that contains the transcript_id
        Returns:
        Colum that contains the transcript_id
      • setTranscriptIdColumn

        public ExtractIntervalLabels setTranscriptIdColumn​(int iNewTranscriptIdColumn)
        Setter for transcriptIdColumn: Colum that contains the transcript_id
        Parameters:
        iNewTranscriptIdColumn - Colum that contains the transcript_id
      • getStartTimeColumn

        public int getStartTimeColumn()
        Getter for startTimeColumn: Column that identifies the time, or start time if an end column is specified, at which the formant should be evaluated.
        Returns:
        Column that identifies the time, or start time if an end column is specified, at which the formant should be evaluated.
      • setStartTimeColumn

        public ExtractIntervalLabels setStartTimeColumn​(int iNewStartTimeColumn)
        Setter for startTimeColumn: Column that identifies the time, or start time if a endTimeColumn is specified, at which the formant should be evaluated.
        Parameters:
        iNewStartTimeColumn - Column that identifies the time, or start time if an end column is specified, at which the formant should be evaluated.
      • getEndTimeColumn

        public Integer getEndTimeColumn()
        Getter for endTimeColumn: Column that identifies the end time of the span for which formants should be evaluated. null if MarkColumn is the target time, or non-null if startTimeColumn and EndTimeColumn should be used to define a mid-point at which the formants should be extracted.
        Returns:
        Column that identifies the end time of the span for which formants should be evaluated. null if startTimeColumn is the target time, or non-null if startTimeColumn and MarkEndColum n should be used to define a mid-point at which the formants should be extracted.
      • setEndTimeColumn

        public ExtractIntervalLabels setEndTimeColumn​(Integer iNewEndTimeColumn)
        Setter for endTimeColumn: Column that identifies the end time of the span for which formants should be evaluated. null if startTimeColumn is the target time, or non-null if startTimeColumn and EndTimeColumn should be used to define a mid-point at which the formants should be extracted.
        Parameters:
        iNewEndTimeColumn - Column that identifies the end time of the span for which formants should be evaluated. null if startTimeColumn is the target time, or non-null if startTimeColumn and EndTimeColumn should be used to define a mid-point at which the formants should be extracted.
      • getFileName

        public String getFileName()
        Getter for fileName: Name to use as the basis for an output file name
        Returns:
        Name to use as the basis for an output file name
      • setFileName

        public ExtractIntervalLabels setFileName​(String sNewFileName)
        Setter for fileName: Name to use as the basis for an output file name
        Parameters:
        sNewFileName - Name to use as the basis for an output file name
      • getParticipantNameColumn

        public int getParticipantNameColumn()
        Getter for participantNameColumn: The index of the column that specifies the name of the speaker.
        Returns:
        The index of the column that specifies the name of the speaker.
      • setParticipantNameColumn

        public ExtractIntervalLabels setParticipantNameColumn​(int iNewParticipantNameColumn)
        Setter for participantNameColumn: The index of the column that specifies the name of the speaker.
        Parameters:
        iNewParticipantNameColumn - The index of the column that specifies the name of the speaker.
      • getPartialContainmentAllowed

        public boolean getPartialContainmentAllowed()
        Getter for partialContainmentAllowed: Whether the extracted annotations are allowed to begin before the start time or finish after the end time of the interval.
        Returns:
        Whether the extracted annotations are allowed to begin before the start time or finish after the end time of the interval.
      • setPartialContainmentAllowed

        public ExtractIntervalLabels setPartialContainmentAllowed​(boolean newPartialContainmentAllowed)
        Setter for partialContainmentAllowed: Whether the extracted annotations are allowed to begin before the start time or finish after the end time of the interval.
        Parameters:
        newPartialContainmentAllowed - Whether the extracted annotations are allowed to begin before the start time or finish after the end time of the interval.
      • getLabelDelimiter

        public String getLabelDelimiter()
        Getter for labelDelimiter: Delimiter to use between labels.
        Returns:
        Delimiter to use between labels. The default is " ".
      • setLabelDelimiter

        public ExtractIntervalLabels setLabelDelimiter​(String newLabelDelimiter)
        Setter for labelDelimiter: Delimiter to use between labels.
        Parameters:
        newLabelDelimiter - Delimiter to use between labels.
      • getLayerIds

        public List<String> getLayerIds()
        Getter for layerIds: IDs of layers to extract annotations for.
        Returns:
        IDs of layers to extract annotations for.
      • setLayerIds

        public ExtractIntervalLabels setLayerIds​(List<String> newLayerIds)
        Setter for layerIds: IDs of layers to extract annotations for.
        Parameters:
        newLayerIds - IDs of layers to extract annotations for.
      • getCopyColumns

        public boolean getCopyColumns()
        Getter for copyColumns: Whether to pass the original columns through from the input CSV file to the output CSV file.
        Returns:
        Whether to pass the original columns through from the input CSV file to the output CSV file.
      • setCopyColumns

        public ExtractIntervalLabels setCopyColumns​(boolean newCopyColumns)
        Setter for copyColumns: Whether to pass the original columns through from the input CSV file to the output CSV file.
        Parameters:
        newCopyColumns - Whether to pass the original columns through from the input CSV file to the output CSV file.
      • descriptiveName

        public String descriptiveName()
        Generates a descriptive name for the processing.
        Returns:
        A name that hints at the processing being done (e.g. "praat-F1-F2") if possible, or "praat" if not.
      • run

        public void run()
        Run the task.
        Specified by:
        run in interface Runnable
        Overrides:
        run in class Thread