normativeai / frontend

GNU General Public License v3.0
5 stars 3 forks source link

Editor for normalized legal text #7

Closed shaolintl closed 5 years ago

shaolintl commented 5 years ago

My idea so far was to leave the parsing of formulas written as free text to the backend. We are working though on a normalized language and I think now that it would be better to have a specific editor for formulas (queries and theories). The editor will allow free text but will have a list of keywords. The user can either click (or drag and drop) or just write down the keyword. The frontend will generate a recursive formula structure containing all the information. I.e the constructor to AND will get two formula arguments, the one for IDEAL will get a deontic formula, IT IS PERMITTED will take a regular formula and TEXT will text arbitrary text and return a formula. This recursive structure will be processed by the backend.

The advantages are that the user will have some help writing correctly formed formulas and to keep typo correction in the frontend instead of getting less informative messages from the backend.

What do you think? @lex-lex @matteo-si

lex-lex commented 5 years ago

As discussed, I will now focus on this task. This is, however, quite a large task and will take a lot of time until working, I fear.

FYI: I found a nice rich text editor that we could use: https://github.com/basecamp/trix It seems easy to extend/to implement features on top of it.

As a first step, I will introduce a text area in which the original legislation will be pasted into. Then, the user can highlight (with the mouse cursor) text portions and annotate it somehow. Maybe we could schedule a skype meeting for how the user flow is supposed to be exactly.

shaolintl commented 5 years ago

@lex-lex Thanks for all the work. I also did some improvements with parsing and error messages as preparation for the defeasible part. I will try to meet Xavier tomorrow and talk with him about that.

We can have a skype meeting anytime you like starting on Friday.

lex-lex commented 5 years ago

A first, preliminary version of an annotator view is uploaded to NAI (approx. as of fae3f63b68280e489b1541b798de692c93d76d0a). We need to work on the concrete annotation GUI in the next step.

lex-lex commented 5 years ago

First version of annotator+editor included.