r4fun / hierplane

🌳 Hierplane for R
https://r4fun.github.io/hierplane/
Other
9 stars 0 forks source link

hierplane_spacy fails with a single token #19

Closed tylerlittlefield closed 4 years ago

tylerlittlefield commented 4 years ago
devtools::load_all()
hierplane_spacy("Bob")
mathidachuk commented 4 years ago

It will actually fail for anything input with no children to parse. We can either:

  1. Throw an error and let them know that you can't make a tree with just the root, or
  2. Let them just plot a single plane. I am leaning towards option two.

Let me know what you think and I can implement.

tylerlittlefield commented 4 years ago

Good point, it really doesn't make sense to plot the root only but I don't mind allowing it. I feel like if we can, and it's not too complicated to implement, no harm in letting it be done. However, if it causes headache to make this works, lets avoid and stop() the user from doing it.