OSCOSS / fiduswriter

This repository only contains the issue list relevant for the work the OSCOSS project is conducting on Fidus Writer. The Fidus Writer sources can be found at https://github.com/fiduswriter/fiduswriter .
1 stars 1 forks source link

an interface for user correction of auto taggin system #97

Open afshinsadeghi opened 6 years ago

afshinsadeghi commented 6 years ago

fw side of the aran auto tagger plugin, adding an interface for user correction.

afshinsadeghi commented 6 years ago

First: we want forced tags. so that user can choose between available tags for sections. if the author has not selected any tag for a section the system do it automatically. (so the system works when it does not exist.)

so the interface can be like adding comments. but they are not shown. only when clicked upon someone can see. The automatic tags do not need to be shown in FW.

second: add tags to sentences. exactly like the comments. but when exported they are inserted in the body not in interface. this tag is also limited. the user only must choose from a list. we define this list in future.

afshinsadeghi commented 6 years ago

another prerequisite: exporting table exists but we are not tagging them. add tags to them.

johanneswilm commented 6 years ago

Hey, I would do it the other way round: first autonatic tags that can be seen. These can be applied when the user creates an auto-tagging button. They are visible so that tge user can make corrections to them - remove those that are incorrectly placed and add sone that are missing. When the ecport happens, all tags should be visible. If there are no tags at all in the document at the time of export, give a warning message before exporting.

afshinsadeghi commented 6 years ago

doco:table for tables doco:figure for diagrams.

afshinsadeghi commented 6 years ago

Hey, the problem is that we do not see the exported document in FW. It adds tags in the html exported file not in the document. So you mean we apply the system inside FW documents?

johanneswilm commented 6 years ago

Yes, I've seen the code. I think to be useful the tagging stage needs to be moved to the document editing stage. The tags there need to be stored in the document as marks. This applies to both manual and automatic tags. In the exporting stage the tags then only need to be translated to the corresponding html attributes. This will require changes to the document schema. To do this efficiently, and because it will be hard to undo, we should look at all the taghing things that are out there. What do we think about schema.org for example?

johanneswilm commented 6 years ago

The changes to the schema could be made in a very general way so that it could be used both for this and other plugins. For example, we could add a mark with the name "tag" and the attributes "type" and "data".

So for example, a mark representing a tag for a headline of the conclusion could have these values:

name: "tag", 
attrs: {
    tagName: "conclusion-header",
    data: {...} // some extra data in the form of an object
}

We also may want to distinguish between those tags that are applied to individual elements and those tags applied to arbitrary text. IN that case we should maybe add an attribute for that and turn the above into

name: "tag", 
attrs: {
    tagType: "block",
    tagName: "conclusion-header",
    data: {...} // some extra data in the form of an object
}
afshinsadeghi commented 6 years ago

@johanneswilm To make it in the document editing stage, how do you trigger exporting the HTML document?

johanneswilm commented 6 years ago

You basically have two independent parts:

  1. The auto-tagging and manual tagging system. For this we need new buttons.

  2. The export system. This is being triggered like hitherto. If a user triggers this export on a document with zero tags in it, instead of exporting we could show a dialog box "The Dokieli format requires tagging of content. This document does not contain any tags at all. Are you sure you want to export this document?"

afshinsadeghi commented 6 years ago

We have now manual annotation and automatic annotation. The manually annotated document can be annotation automatically in the export.

It can happen that we have the repetition of annotations of manual and automatic annotation. To avoid the collision in the automatic annotation we add a check, if it is already annotated it does not do it.

afshinsadeghi commented 6 years ago

we convert it to a plugin afterwards

johanneswilm commented 6 years ago

It is a plugin already. Automatic tagging on export will not work because that will also add incorrect tags with no way for the user to adjust them.

s6fikass commented 6 years ago

The idea is also to change the plugin where it doesn't tag any manually edited tags

afshinsadeghi commented 6 years ago

with the approach above at least we give the user the chance to set them first so the automatic annotator will not annotate then. @johanneswilm have you checked to what percent it was doing wrong? that is also of interest.

johanneswilm commented 6 years ago

Text taggers have been around for a while and they tend to always be working this way: first automatic tagging, then user tagging corrections. This is the only way I can think of to ensure both making life easier for the user AND giving tge user ultimate control over the tags. Other approaches have the aforementioned problems. You will not be able to get any percentages on it either, as noone will be using a tagger they cannot control. But there is still room for experimentation in user interface design: for example - what to do if the auto tagger is used after manual tagging? Or what happens if the user doesn't tag at all and then wants to export to a format that requires tags?

afshinsadeghi commented 6 years ago

I was trying to say this from the beginning. user manually sets tags, and for those that he has not the automated tagger work.

johanneswilm commented 6 years ago

Ok just to be sure we are saying the same thing: If you have the automatic tagger AFTER the manual, the automatic tagger will possibly set sone tags incorrectly and the user has no way to remove those tags. That will be very frustrating to the user. So the order needs to be: FIRST automatic tagging THEN manual adjustment of tags.

Is that also what you were trying to say?

afshinsadeghi commented 6 years ago

No, I had the other way round in mind.

  1. The user sets the tags he prefers manually, then on export,
  2. The automatic tagger tags those places that are not done by users. But Yes The user always can edit the tag of the exported document.(yes that is already possible in dokieli)
  3. The user can check if in places the document is tagged with wrong tags edit them in the exported document via the interface of dokieli.
johanneswilm commented 6 years ago

Unless they have set up a special system, that basically means editing the source code by hand. Also, the collaborative features are gone.