Class LanguageResource

java.lang.Object
org.apache.tika.server.core.resource.LanguageResource

@Path("/language") public class LanguageResource extends Object
  • Field Details

    • MAX_DETECT_CHARS

      public static final int MAX_DETECT_CHARS
      Detection accuracy saturates within the first few thousand characters, so anything past this only buys work whose size the caller chooses. Input beyond it is ignored rather than rejected: the answer is the same either way, and rejecting would break callers who legitimately post whole documents.

      This bounds the detection, not the request. This endpoint holds the text in the server's own heap instead of a pipes child, so a large enough body still costs memory before this class sees it; bounding the body itself is maxRequestSizeBytes' job.

      See Also:
  • Constructor Details

    • LanguageResource

      public LanguageResource()
  • Method Details