class_docstr: Interface to the Stanford Segmenter
  
  If stanford-segmenter version is older than 2016-10-31, then path_to_slf4j
  should be provieded, for example::
  
      seg = StanfordSegmenter(path_to_slf4j='/YOUR_PATH/slf4j-api.jar')
  
  >>> from nltk.tokenize.stanford_segmenter import StanfordSegmenter
  >>> seg = StanfordSegmenter() # doctest: +SKIP
  >>> seg.default_config('zh') # doctest: +SKIP
  >>> sent = u'这是斯坦福中文分词器测试'
  >>> print(seg.segment(sent)) # doctest: +SKIP
  这 是 斯坦福 中文 分词器 测试
  <BLANKLINE>
  >>> seg.default_config('ar') # doctest: +SKIP
  >>> sent = u'هذا هو تصنيف ستانفورد العربي للكلمات'
  >>> print(seg.segment(sent.split())) # doctest: +SKIP
  هذا هو تصنيف ستانفورد العربي ل الكلمات
  <BLANKLINE>
code: def _execute(self, cmd, verbose=False):
      encoding = self._encoding
      cmd.extend(["-inputEncoding", encoding])
      _options_cmd = self._options_cmd
      if _options_cmd:
          cmd.extend(["-options", self._options_cmd])
  
      default_options = " ".join(_java_options)
  
      # Configure java.
      config_java(options=self.java_options, verbose=verbose)
  
      stdout, _stderr = java(
          cmd, classpath=self._stanford_jar, stdout=PIPE, stderr=PIPE
      )
      stdout = stdout.decode(encoding)
  
      # Return java configurations to their default values.
      config_java(options=default_options, verbose=False)
  
      return stdout
  
file_path: nltk/nltk/tokenize/stanford_segmenter.py
imports: import json
  import os
  import tempfile
  import warnings
  from subprocess import PIPE
  from nltk.internals import _java_options, config_java, find_dir, find_file, find_jar, java
  from nltk.tokenize.api import TokenizerI
label_desc: Use image node_id 7 for calling the StanfordSegmenter obj's underlying member method code with example usage: obj._execute(cmd, verbose) and returns: stdout