Abstract Wikipedia talk:Abstract article architectures
Add topicThe whole article?
[edit]re: Semantic units, why do we need to process the whole article at once? Is that really necessary? Can't we split it up into paragraphs? Feeglgeef (talk) 15:13, 11 May 2026 (UTC)
- That was more or less the idea I had for another alternative architecture, that I haven't formalized yet. Dv103 (talk) 15:29, 11 May 2026 (UTC)
- @Feeglgeef @Mahir256 Now I've formalized my architecture (the same one I showed in the Volunteers' Corner). Dv103 (talk) 19:12, 11 May 2026 (UTC)
- The use of semantic units does not preclude introducing section/paragraph breaks, but trying to non-serially render the parts of an article would only make sense if each section/paragraph described a truly self-contained, isolated set of details/circumstances, which for an article focusing a single topic would be difficult to justify. (If you're telling a story about a butcher (Q329737), a baker (Q160131), and a candle-maker (Q1739737), and they're introduced in the first section/paragraph, what are you supposed to do if the system in its parallel logic starts rendering the fifth paragraph first?) Mahir256 (talk) 17:49, 11 May 2026 (UTC)
Move out of userspace?
[edit]Shouldn't this be in the project space if you want it to be collaborative? Feeglgeef (talk) 01:29, 12 May 2026 (UTC)
- Perhaps it's better. Dv103 (talk) 08:27, 12 May 2026 (UTC)
- Done Dv103 (talk) 16:42, 12 May 2026 (UTC)
- Thanks! Feeglgeef (talk) 17:14, 12 May 2026 (UTC)
- Done Dv103 (talk) 16:42, 12 May 2026 (UTC)
Actual differences between "streaming" and otherwise?
[edit]I will note that Ninai's implementation of contexts consists of a for loop through the semantic units provided to the context, which isn't that different from the mechanism listed under 'streaming semantic units'—in an attempt to map the diagram in that section to the code I linked, the "abstract paragraph constructor" is effectively the current command in a loop iteration, "unrendered abstract content" is simply the list of commands not yet processed by the for loop, and "updated context" is a combination of current_references (locally defined entities) and basic_framing (configuration options). Yet contexts themselves are semantic units in their own right; they do not have any special handling within the Ninai base, and (with reference to the diagram under "Semantic unit architecture") are just another "Rendering" block. Part of the reason I have not attempted to make statements in Ninai render in a slightly more streaming fashion yet—giving the "HTML" parts after each "renderer" of the 'streaming' diagram an analogue in code—is that the best choice for making a separate syntactic unit rendering service work in Python is not yet clear to me—subprocesses? threads? multiprocessing? how does free-threading fit in? Once that decision is made, the little hack I devised of attaching other sentences to the first sentence as dependents and undoing that attachment at syntactic unit rendering time can be made non-obligatory. Mahir256 (talk) 16:55, 24 May 2026 (UTC)
- I'm happy to hear that the current implementation of Ninai is already compatible with the streaming model.
- The main difference between the streaming and the normal mode is a technical one on the Abstract Wikipedia implementation: in the normal mode, that is the only one among these two that is currently technically possible, the loop for the generation of the entire article would entirely be executed within a single Wikifunctions function call. Considering that a realistic but optimistic execution time (with the current infrastructure) for a simple "sentence" could be 1.5 seconds, this would mean that any article with more that 7 sentences would be impossible to render within the current execution time limit of 10 seconds. This estimate is very optimistic, since you can check that for most languages, even with the current implementations of the fragment generating functions (that are way simpler than what the Semantic/Syntactic unit renderers would be), even a single paragraph with 2 or 3 sentences times out for basically every language.
- The "stream" model is an attempt to solve this problem, separating the article generation in multiple function calls. In this way, every function call could have its own 10 seconds runtime available, and the Abstract Wikipedia page could start redering gradually, giving a way better user experience than waiting 5 minutes for the generation of the entire article. Dv103 (talk) 19:48, 24 May 2026 (UTC)
HTML, monolingual text or String for fragments
[edit]I don't quite understand the proposed structures, but I think there is an important issue on the Output type of parts for text segments. Currently some sentences produce String output (like f:Z26039 ) or monolingual text output ( like f:Z26570 ). Apart from not being consistent I think there is even a bigger issue: these types don't allow text to be set in bold (in the introduction sentence for instance), or wikilinks to other AW articles. Or marking text as NLG default text ( f:Z35921 )
Am I correct that is only allowed in HTML text? If so I think we should change ALL languages functions to output type HTML as soon as possible.
In my opinion it would be even better if all language text would be in Wiki syntax to be parsed EXACTLY as done on the (future) client Wikipedia. HenkvD (talk) 09:27, 10 June 2026 (UTC)