title: NLTK Stanford Segmentor, how to set CLASSPATH
body: <p>I'm trying to use the Stanford Segementer bit from the NLTK Tokenize package. However, I run into issues just trying to use the basic test set. Running the following:</p>
  
  <pre><code># -*- coding: utf-8 -*-
  from nltk.tokenize.stanford_segmenter import StanfordSegmenter
  seg = StanfordSegmenter()
  seg.default_config('zh')
  sent = u'这是斯坦福中文分词器测试'
  print(seg.segment(sent))
  </code></pre>
  
  <p>Results in this error: 
  <a href="https://i.stack.imgur.com/bXjyE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bXjyE.png" alt="Error"></a></p>
  
  <p>I got as far as to add...</p>
  
  <pre><code>import os
  javapath = "C:/Users/User/Folder/stanford-segmenter-2017-06-09/*"
  os.environ['CLASSPATH'] = javapath
  </code></pre>
  
  <p>...to the front of my code, but that didn't seem to help. </p>
  
  <p>How do I get the segmentor to run properly? </p>