mxgmn / MarkovJunior

Probabilistic language based on pattern matching and constraint propagation, 153 examples
MIT License
7.53k stars 317 forks source link

Documentation for xml format #13

Open LBroe opened 2 years ago

LBroe commented 2 years ago

I'd love some documentation about the syntax of the model XML files. At the moment we can only deduce the nodes and parameters from the examples.

tscales commented 2 years ago

The node factory is a good place to start, These will be your toplevel elements.

https://github.com/mxgmn/MarkovJunior/blob/222cd2eec0d726ef1772a906532cb06036f7f453/source/Node.cs#L24-L38

Each node has a Load method which should help deduce what nested elements the node is expecting.

inkydragon commented 2 years ago

I'm trying to write xsd definitions for xml files. It looks like VS can automatically load the xsd and display popups. Of course it is also important to write human-readable documentation.

Some attempts (remarks may not be accurate):

models.xsd put this at `docs/models.xsd` ```xml Model xml file name. File `$"models/{name}.xml"` should exist. Output Size in Pixel. default=-1 Note: If `size` is not specified, then `widht` and `hight` should be specified. Output dimension. [2, 3] default=2 X-axis length. default=size Y-axis width. default=size Z-axis height. 2D (d==2), default=1; 3D (d==3), default=size; Number of output files. default=2 Pixel point size. default=4 Random number seed list. default=null Whether to output gifs. default=false Whether to output in `iso` format. default=false Number of rule execution steps. GIF (gif==true), default=1000; Others (gif==false), default=50000; The width of the graphical rule sidebar in the output image. default=0 (not show) ```

image image image image

aseaday commented 2 years ago

Hi, I am working on a port of Markov Junior project. And I am considering to create a doc for this project. What syntax doc format do you prefer or recommend?

LBroe commented 2 years ago

@aseaday It's supposed to be a programming language, so we need a description of how to write a program with it. What are the keywords and how does the control flow work? I'd just start with a markdown file, because that is the most accessible format.

aseaday commented 2 years ago

How about Gitbook. I think the syntaxs is not the first grasp of user's attentions. Maybe an introuction about what is markov generatation and more detailed guide woule useful. @mxgmn, Are you ok to open a repo about docs?


发件人: Leon Bröckers @.***> 发送时间: 2022年6月6日 14:29 收件人: mxgmn/MarkovJunior 抄送: nullday; Mention 主题: Re: [mxgmn/MarkovJunior] Documentation for xml format (Issue #13)

@aseadayhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Faseaday&data=05%7C01%7C%7Caca9014371e1432959eb08da4785e598%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637900937661024852%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=WF1Hwza6ksuBrKFsxSE1sIlninG%2FzW8UciBQc2wRs2E%3D&reserved=0 It's supposed to be a programming language, so we need a description of how to write a program with it. What are the keywords and how does the control flow work? I'd just start with a markdown file, because that is the most accessible format.

— Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmxgmn%2FMarkovJunior%2Fissues%2F13%23issuecomment-1147095861&data=05%7C01%7C%7Caca9014371e1432959eb08da4785e598%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637900937661024852%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=ZEMC6hlYzIx1gAbATg4QuamXDvzoGgOvOctDIO%2FIcDU%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAA562O6DDMD5YQRFWD2IDKDVNWLEHANCNFSM5XYDBN3A&data=05%7C01%7C%7Caca9014371e1432959eb08da4785e598%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637900937661024852%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=JjPF5EEWo9rnpBm1FMMtLB34G7ZWwY0d9hd0bo9AVFY%3D&reserved=0. You are receiving this because you were mentioned.Message ID: @.***>

LBroe commented 2 years ago

@aseaday But the syntax is exactly what's missing. We already have a long and thorough readme with links to further information. We just don't know how to write a program with this programming language.

inkydragon commented 2 years ago

How about Gitbook.

I would recommend GitHub pages. We can write some md documentation first and then decide how to deploy it.

aseaday commented 2 years ago

How about we talk in Documentation and resources #24. I think we could formally do this thing as a team.

aseaday commented 2 years ago

@aseaday But the syntax is exactly what's missing. We already have a long and thorough readme with links to further information. We just don't know how to write a program with this programming language.

I got you. The explanation of node type and there combination rule is missing.

mxgmn commented 2 years ago

I have started writing about xml syntax in syntax.md. Hope this helps!