Class SwebleWikipediaTextFilter

java.lang.Object
org.languagetool.dev.wikipedia.SwebleWikipediaTextFilter
All Implemented Interfaces:
TextMapFilter

public class SwebleWikipediaTextFilter extends Object implements TextMapFilter
Convert Wikipedia syntax to HTML using Sweble.
  • Constructor Details

    • SwebleWikipediaTextFilter

      public SwebleWikipediaTextFilter()
  • Method Details

    • filter

      public PlainTextMapping filter(String wikiText)
      Description copied from interface: TextMapFilter
      Filter the given text, keeping a mapping from plain text to original markup positions. Note that the result's mapping may be null if mapping has been disabled for performance reasons.
      Specified by:
      filter in interface TextMapFilter
    • enableMapping

      public void enableMapping(boolean enable)
      Set this to false for better performance. The result of filter(String) will then have a null mapping.