class SrxTools {

  private SrxTools() {
  }

  static SrxDocument createSrxDocument(String path) {<FILL_FUNCTION_BODY>}

  static List<String> tokenize(String text, SrxDocument srxDocument, String code) {
    List<String> segments = new ArrayList<>();
    TextIterator textIterator = new SrxTextIterator(srxDocument, code, text);
    while (textIterator.hasNext()) {
      segments.add(textIterator.next());
    }
    return segments;
  }

}

    try {
      try (
        InputStream inputStream = JLanguageTool.getDataBroker().getFromResourceDirAsStream(path);
        BufferedReader srxReader = new BufferedReader(new InputStreamReader(inputStream, StandardCharsets.UTF_8))
      ) {
        Map<String, Object> parserParameters = new HashMap<>();
        parserParameters.put(Srx2SaxParser.VALIDATE_PARAMETER, true);
        SrxParser srxParser = new Srx2SaxParser(parserParameters);
        return srxParser.parse(srxReader);
      }
    } catch (IOException e) {
      throw new RuntimeException("Could not load SRX rules", e);
    }
  
<no_super_class>