title: spaCy Alternatives in Java
body: <p>I currently use spaCy to traverse the dependency tree, and generate entities. </p>
  
  <pre><code>nlp = get_spacy_model(detect_lang(unicode_text))
  doc = nlp(unicode_text)
  
  entities = set()
  for sentence in doc.sents:
  
    # traverse tree picking up entities
    for token in sentence.subtree:
      ## pick entitites using some pre-defined rules
  
  entities.discard('')
  return entities
  </code></pre>
  
  <p>Are there any good Java alternatives for spaCy? </p>
  
  <p>I am looking for libs which generate the Dependency Tree as is done by spaCy.</p>
  
  <p>EDIT:</p>
  
  <p>I looked into Stanford Parser. However, it generated the following parse tree:</p>
  
  <pre><code>                     ROOT
                        |
                        NP
         _______________|_________
        |                         NP
        |                _________|___
        |               |             PP
        |               |     ________|___
        NP              NP   |            NP
    ____|__________     |    |     _______|____
   DT   JJ    JJ   NN  NNS   IN   DT      JJ   NN
   |    |     |    |    |    |    |       |    |
  the quick brown fox jumps over the     lazy dog
  </code></pre>
  
  <p>However, I am looking for a tree structure like spaCy does:</p>
  
  <pre><code>                             jumps_VBZ
     __________________________|___________________
    |       |        |         |      |         over_IN
    |       |        |         |      |            |
    |       |        |         |      |          dog_NN
    |       |        |         |      |     _______|_______
  The_DT quick_JJ brown_JJ   fox_NN  ._. the_DT         lazy_JJ
  </code></pre>