class_docstr: A client to the Stanford CoreNLP server. 
docstr: Send a regex-related request to the CoreNLP server.
  
  :param (str | unicode) path: the path for the regex endpoint
  :param text: raw text for the CoreNLPServer to apply the regex
  :param (str | unicode) pattern: regex pattern
  :param (bool) filter: option to filter sentences that contain matches, if false returns matches
  :param properties: option to filter sentences that contain matches, if false returns matches
  :return: request result
docstr_tok: ["Send","a","regex-related","request","to","the","CoreNLP","server",".",":","param","(","str","|","unicode",")","path",":","the","path","for","the","regex","endpoint",":","param","text",":","raw","text","for","the","CoreNLPServer","to","apply","the","regex",":","param","(","str","|","unicode",")","pattern",":","regex","pattern",":","param","(","bool",")","filter",":","option","to","filter","sentences","that","contain","matches",",","if","false","returns","matches",":","param","properties",":","option","to","filter","sentences","that","contain","matches",",","if","false","returns","matches",":","return",":","request","result"]
code: def __regex(
      self,
      path,
      text,
      pattern,
      filter,
      annotators=None,
      properties=None,
  ):
      """
      Send a regex-related request to the CoreNLP server.
  
      :param (str | unicode) path: the path for the regex endpoint
      :param text: raw text for the CoreNLPServer to apply the regex
      :param (str | unicode) pattern: regex pattern
      :param (bool) filter: option to filter sentences that contain matches, if false returns matches
      :param properties: option to filter sentences that contain matches, if false returns matches
      :return: request result
      """
      if self.start_server is not StartServer.DONT_START:
          self.ensure_alive()
      if properties is None:
          properties = {}
          properties.update(
              {
                  "inputFormat": "text",
                  "serializer": "edu.stanford.nlp.pipeline.ProtobufAnnotationSerializer",
              }
          )
      if annotators:
          properties["annotators"] = (
              ",".join(annotators)
              if isinstance(annotators, list)
              else annotators
          )
  
      # force output for regex requests to be json
      properties["outputFormat"] = "json"
      # if the server is trying to send back character offsets, it
      # should send back codepoints counts as well in case the text
      # has extra wide characters
      properties["tokenize.codepoint"] = "true"
  
      try:
          # Error occurs unless put properties in params
          input_format = properties.get("inputFormat", "text")
          if input_format == "text":
              ctype = "text/plain; charset=utf-8"
          elif input_format == "serialized":
              ctype = "application/x-protobuf"
          else:
              raise ValueError(
                  "Unrecognized inputFormat " + input_format
              )
          # change request method from `get` to `post` as required by CoreNLP
          r = requests.post(
              self.endpoint + path,
              params={
                  "pattern": pattern,
                  "filter": filter,
                  "properties": str(properties),
              },
              data=text.encode("utf-8")
              if isinstance(text, str)
              else text,
              headers={"content-type": ctype},
              timeout=(self.timeout * 2) / 1000,
          )
          r.raise_for_status()
          if r.encoding is None:
              r.encoding = "utf-8"
          return json.loads(r.text)
      except requests.HTTPError as e:
          if r.text.startswith("Timeout"):
              raise TimeoutException(r.text)
          else:
              raise AnnotationException(r.text)
      except json.JSONDecodeError:
          raise AnnotationException(r.text)
  
imports: import atexit
  import contextlib
  import enum
  import io
  import os
  import re
  import requests
  import logging
  import json
  import shlex
  import socket
  import subprocess
  import time
  import sys
  import uuid
  from datetime import datetime
  from pathlib import Path
  from urllib.parse import urlparse
  from stanza.protobuf import Document, parseFromDelimitedString, writeToDelimitedString, to_text
label_desc: Use image node_id 11 for calling the CoreNLPClient obj's underlying member method code with example usage: obj.__regex(path, text, pattern, filter, annotators, properties) and returns: json