Uploaded image for project: 'UIMA'
  1. UIMA
  2. UIMA-2359

Different results of Text Maker in windows and unix

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.0TextMarker
    • 2.0.0TextMarker
    • Ruta, Sandbox
    • Windows

    Description

      The class AbstractApplyScriptHandlerJob when called from the workbenck calls, for reding text to be analyzed the method:
      org.apache.uima.pear.util.FileUtil.loadTextFile(new File(each), "UTF-8");
      Such a method return nelines in window as 2 new lines. Therefore basic TextMarker annotations appears like:
      line BREAK BREAK
      line BREAK BREAK
      Therefore grammars written on windows must take into account the double break which make them not applicable when running on unix or when using other read methods, such as:
      Scanner sc = new Scanner(inFile, "UTF-8");
      String out = "";
      while (sc.hasNextLine())

      { out += sc.nextLine() + "\n"; }

      Relates to:
      https://issues.apache.org/jira/browse/UIMA-2133t

      Attachments

        Activity

          People

            pkluegl Peter Klügl
            lucadini Luca Dini (CELI)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: