Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

does not work with plain tags and whitespace #76

Open
arjunmenon opened this issue Dec 4, 2016 · 0 comments
Open

does not work with plain tags and whitespace #76

arjunmenon opened this issue Dec 4, 2016 · 0 comments

Comments

@arjunmenon
Copy link

arjunmenon commented Dec 4, 2016

I have a tag set like this

irb(main):001:0> tagged = <vb>Tell</vb> <prp>me</prp> <det>the</det> <jj>current</jj> <nn>temperature</nn>

irb(main):002:0> parser = Nori.new.parse(tagged)
=> {"vb"=>"Tell"}

It does not parse the other tags.

If I remove the whitespace it still returns the same result and if the parser is set to REXML

irb(main):014:0> parser = Nori.new(:parser => :rexml)
=> #<Nori:0x81c956b8 @options={:strip_namespaces=>false, :delete_namespace_attributes=>false, :convert_tags_to=>nil, :convert_attributes_to=>nil, :empty_tag_value=>nil, :advanced_typecasting=>true, :convert_dashes_to_underscores=>true, :parser=>:rexml}>
irb(main):015:0> parser.parse('<vb>Tell</vb><prp>me</prp><det>the</det><jj>current</jj><nn>temperature</nn>')
=> {"vb"=>"Tell<prp>me</prp><det>the</det><jj>current</jj><nn>temperature</nn>"}

It simply not returning the expected hash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant