Hacker News new | ask | show | jobs
Ask HN: Any open source text editors with word tagging?
1 points by neo_hacker 1422 days ago
I am looking for a text editor where users can tag words with meta data. "Jhon doe started the car." -> John doe <person>, car <vehicle>

I want these tags to be programmable/exportable so that when we process the document, I can process based on custom rules. Eg. Different colours for person, objects, location , Show summary in the side panel etc .

3 comments

I think you might be able to do something like this with LibreOffice Writer using Smart Tags. It's also possible the tag data is exported with HTML. But I haven't tried it.

Personally I think I'd go straight to CKEditor and things like span tags, as 1) you can effectively tag words with metadata, 2) you can process it however you'd like, and 3) it's simple to add your own buttons or plugins for additional conveniences.

Using a CMS and basic web tooling you could build a simple version of what you're looking for pretty fast I'd guess.

I worked at a place where we developed a system for doing this kind of tagging but it was for making training sets and there was no expectation that you could export the document from the system for normal use.

Quite a few NLP annotation systems are out there

https://prodi.gy/

https://brat.nlplab.org/

https://doccano.herokuapp.com/

This is out of the scope of a text editor. Instead, you could write a script to convert your text to HTML.
Something like this?

<person>Jhon doe</person> started the <vehicle>car</vehicle>.

It is not just UI highlight. I want to be able to store them for processing later.
The format proposed by gus_massa would be capable of both of these tasks. You can generate HTML for the visual highlight, and do whatever processing that you wish in a different script.

This is just my 2 cents, I have no idea what your intended application is.