Wikianswers/Technical discussion/Computer-aided document authoring
Introduction
editOn Wikipedia, there are over 1.9 edits made every second. An unknown percentage of these edits involve users correcting one another’s language use, e.g., spelling, grammar, or readability.
This page broaches computer-aided document authoring with MediaWiki software. MediaWiki software could support and interoperate with an extensible set of server-side document-processing tools. The outputs of these tools can be represented as annotations. These annotations can be merged, aggregated, and presented to users as they edit, view, or view more information about wiki documents.
Server-side document-processing tools
editThere are two flavors of server-side document-processing tools:
- Tools for formal languages, e.g., programming languages and domain-specific languages. Tools, in these regards, include parsers, linters, and compilers which can each output annotations such as informational, warning, and error messages about portions of content.
- Tools for natural languages. Tools, in these regards, include, but are not limited to: spellchecking, grammar checking, readability analysis, sentiment analysis, analysis of subjectivity and objectivity, fact-checking, reasoning checking, and argument verification and validation.
For natural languages, traditionally spellchecking has been performed client-side and integrated into Web browsers, e.g., spellchecking in HTML textboxes. More forms of document processing, as the above list intends to show, can be concurrently performed by server-side software. The outputs of multiple, asynchronous document-processing tools can be readily merged together, aggregated, and presented to users.
Annotations
editThe outputs of document-processing tools can be represented as annotations. Annotations are data structures which bear information about documents or about portions of documents. Annotations refer to portions of documents via selectors. Means of selecting portions of document content include: URI fragments, CSS selectors, XPath selectors, text quote selectors, text position selectors, data position selectors, SVG selectors, and range selectors. Selections can also refine other selections; a selection can be made relative to the contents of a containing selection.
For more information about annotations and selectors, see the Web Annotation Data Model.
User-experience concepts
editAnnotations from multiple server-side document-processing tools can be visualized by and interacted with by users while editing, viewing, or viewing further information about documents.
- Document previews. Some annotations from server-side document-processing tools could accompany and be visualized for previewed provisional documents.
- Published documents. Some annotations from server-side document-processing tools could accompany and be visualized for published documents.
- Some categories of annotations may be automatically removed in the event of page edits. Some categories of annotations could be removed upon page edits so that notified systems could revisit edited documents to subsequently reprocess them and add content-accurate annotations.
- Page information. Some annotations from server-side document-processing tools could accompany published documents without having to be visualized for the published documents. They could be, instead, displayed for users when they navigate to "Page information" in the "Tools" menu in the left margin (or a new menu item in the "Tools" menu).
User-interface and user-experience considerations are, broadly, similar to those from integrated development environments and word-processing software.
Annotations can be visualized in a number of ways. These include text decorations such as colored highlighting and underlining.
Some varieties of annotations may require users to select them, in some manner, before any relevant document content is visually indicated.
Useful content could be presented to users in hoverboxes when they hover over visually-decorated document content with one or more corresponding annotations.
Some annotated document content could be provided with context menus for users to select options pertaining to the editing of their provisional wiki documents.
MediaWiki software discussion
editMediaWiki software support for interoperation with an extensible set of server-side document-processing tools, support for annotations, and support for related client-side user interfaces would benefit the proposed Wikianswers project, would benefit a number of existing Wikimedia projects, e.g., Wikifunctions, Wikipedia, and Wikinews, and would benefit the projects of downstream users of MediaWiki software.
Should MediaWiki software come to support an extensible set of server-side document-processing tools, this might entail a new type of extension. Presently, MediaWiki supports an extensible set of content models and this new type of extension is envisioned as being interoperable with content model extensions. Many content models involve formal languages which can be processed into HTML for display. In some cases (e.g., wikitext or markdown), these output HTML documents are natural-language documents. Accordingly, many content models could be benefitted by server-side document-processing tools for both formal-language and natural-language documents.
A first implementation
editServer-side document-processing tools could be provided as third-party extensions to MediaWiki software. A first implementation of this new type of extension could be useful to design alongside any architecture, infrastructure, and API's. This first implementation could also be useful as a coding example, illustrating to developers how to implement the new type of extension.
It is an open question which specific implementation should be created first while designing the new architecture, infrastructure, and API's. It could be a tool for formal languages, e.g., a Python or wikitext linter, or a tool for natural languages, e.g., a spellchecker, grammar checker, or readability analyzer.
See also
edit- Annotation
- Argument technology
- Automated decision-making
- Compiler
- Context menu
- Fact-checking
- Grammar checker
- Hoverbox
- Integrated development environment
- Language Server Protocol
- Natural-language processing
- Parser
- Readability
- Sentiment analysis
- Sentiment analysis § Subjectivity/objectivity identification
- Source code
- Spell checker
- Text annotation
- Web annotation
- Word-processor program