Page MenuHomePhabricator
Paste P11967

ZObject fun; conjunction
ActivePublic

Authored by Jdforrester-WMF on Jul 20 2020, 4:05 PM.
Referenced Files
F31942113: raw.txt
Jul 20 2020, 4:05 PM
Subscribers
{
"ZType": "ZFunction",
"ZLabel": {
"ZType": "ZMultiLingualLabelSet",
"ZValue": [
{
"ZType": "ZMultiLingualLabel",
"ZLanguageCode": "en",
"ZValue": "conjunction"
},
{
"ZType": "ZMultiLingualLabel",
"ZLanguageCode": "it",
"ZValue": "congiunzione"
}
]
},
"ZDesc": {
"ZType": "ZMultiLingualLabelSet",
"ZValue": [
{
"ZType": "ZMultiLingualLabel",
"ZLanguageCode": "en",
"ZValue": "renders a list"
},
{
"ZType": "ZMultiLingualLabel",
"ZLanguageCode": "it",
"ZValue": "rende un elenco"
}
]
},
"ZDoc": {
"ZType": "ZWikitextBlob",
"ZValue": "A list of noun phrases rendered into '''''single''' noun phrase'' with a conjunction."
},
"ZFunction_args": [
{
"ZType": "ZArgumentDeclaration",
"ZArgumentDeclaration": "ZList(ZString)",
"ZArgumentRequirement": "true",
"ZLabel": {
"ZType": "ZMultiLingualLabelSet",
"ZValue": [
{
"ZType": "ZMultiLingualLabel",
"ZLanguageCode": "en",
"ZValue": "list"
},
{
"ZType": "ZMultiLingualLabel",
"ZLanguageCode": "it",
"ZValue": "l'elenco"
}
]
},
"ZDesc": {
"ZType": "ZMultiLingualLabelSet",
"ZValue": [
{
"ZType": "ZMultiLingualLabel",
"ZLanguageCode": "en",
"ZValue": "the list of noun phrases to be conjuncted"
},
{
"ZType": "ZMultiLingualLabel",
"ZLanguageCode": "it",
"ZValue": "l'elenco delle frasi nominali da congiungere"
}
]
}
},
{
"ZType": "ZArgumentDeclaration",
"ZArgumentDeclaration": "ZBoolean",
"ZArgumentRequirement": "false",
"ZArgumentDefault": "false",
"ZLabel": {
"ZType": "ZMultiLingualLabelSet",
"ZValue": [
{
"ZType": "ZMultiLingualLabel",
"ZLanguageCode": "en",
"ZValue": "Oxford comma"
},
{
"ZType": "ZMultiLingualLabel",
"ZLanguageCode": "it",
"ZValue": "virgola di Oxford"
}
]
},
"ZDesc": {
"ZType": "ZMultiLingualLabelSet",
"ZValue": [
{
"ZType": "ZMultiLingualLabel",
"ZLanguageCode": "en",
"ZValue": "whether to use the Oxford comma or not"
},
{
"ZType": "ZMultiLingualLabel",
"ZLanguageCode": "it",
"ZValue": "se usare o meno la virgola di Oxford"
}
]
}
},
{
"ZType": "ZArgumentDeclaration",
"ZArgumentDeclaration": "ZLanguageCode",
"ZArgumentRequirement": "false",
"ZLabel": {
"ZType": "ZMultiLingualLabelSet",
"ZValue": [
{
"ZType": "ZMultiLingualLabel",
"ZLanguageCode": "en",
"ZValue": "language"
},
{
"ZType": "ZMultiLingualLabel",
"ZLanguageCode": "it",
"ZValue": "linguaggio"
}
]
},
"ZDesc": {
"ZType": "ZMultiLingualLabelSet",
"ZValue": [
{
"ZType": "ZMultiLingualLabel",
"ZLanguageCode": "en",
"ZValue": "in which language to conjunct these nouns, if not that of the given input"
},
{
"ZType": "ZMultiLingualLabel",
"ZLanguageCode": "it",
"ZValue": "in quale lingua congiungere questi sostantivi, se non quello dell'input dato"
}
]
}
}
],
"ZFunction_output": "ZString",
"ZFunction_tests": [
"Z1234",
"Z1236",
"Z1239"
]
}

Event Timeline

Jdforrester-WMF updated the paste's language from autodetect to json.
{
	"ZType": "ZPersistentobject",
	"ZLabel": {
		"ZType": "ZMultiLingualLabelSet",
		"ZValue": [
			{
				"ZType": "ZMonoLingualLabel",
				"ZLanguageCode": "en",
				"ZValue": "conjunction"
			},
			{
				"ZType": "ZMonoLingualLabel",
				"ZLanguageCode": "it",
				"ZValue": "congiunzione"
			}
		]
	},
	"ZDesc": {
		"ZType": "ZMultiLingualLabelSet",
		"ZValue": [
			{
				"ZType": "ZMultiLingualLabel",
				"ZLanguageCode": "en",
				"ZValue": "renders a list"
			},
			{
				"ZType": "ZMultiLingualLabel",
				"ZLanguageCode": "it",
				"ZValue": "rende un elenco"
			}
		]
	},
	"ZDoc": {
		"ZType": "ZWikitextBlob",
		"ZValue": "A list of noun phrases rendered into '''''single''' noun phrase'' with a conjunction."
	},
	"ZValue": {
		"ZType": {
			"ZType": "ZFunctioncall",
			"ZFunction": "ZFunction",
			"ZArgumenttypes": [
				{
					"ZType": "ZFunctioncall",
					"ZFunction": "ZList",
					"ZElementtype": "ZString"
				},
				"ZBoolean"
			],
			"ZReturntype": "ZString"
		},
		"ZFunction_args": [
			{
				"ZType": "ZArgumentDeclaration",
				"ZArgumentDeclaration": {
					"ZType": "ZFunctioncall",
					"ZFunction": "ZList",
					"ZElementtype": "ZString"
				},
				"ZArgumentRequirement": "ZTrue",
				"ZLabel": {
					"ZType": "ZMultiLingualLabelSet",
					"ZValue": [
						{
							"ZType": "ZMonoLingualLabel",
							"ZLanguageCode": "en",
							"ZValue": "list"
						},
						{
							"ZType": "ZMonoLingualLabel",
							"ZLanguageCode": "it",
							"ZValue": "l'elenco"
						}
					]
				},
				"ZDesc": {
					"ZType": "ZMonoLingualLabelSet",
					"ZValue": [
						{
							"ZType": "ZMultiLingualLabel",
							"ZLanguageCode": "en",
							"ZValue": "the list of noun phrases to be conjuncted"
						},
						{
							"ZType": "ZMonoLingualLabel",
							"ZLanguageCode": "it",
							"ZValue": "l'elenco delle frasi nominali da congiungere"
						}
					]
				}
			},
			{
				"ZType": "ZArgumentDeclaration",
				"ZArgumentDeclaration": "ZBoolean",
				"ZArgumentRequirement": "Zfalse",
				"ZArgumentDefault": "Zfalse",
				"ZLabel": {
					"ZType": "ZMultiLingualLabelSet",
					"ZValue": [
						{
							"ZType": "ZMonoLingualLabel",
							"ZLanguageCode": "en",
							"ZValue": "Oxford comma"
						},
						{
							"ZType": "ZMonoLingualLabel",
							"ZLanguageCode": "it",
							"ZValue": "virgola di Oxford"
						}
					]
				},
				"ZDesc": {
					"ZType": "ZMultiLingualLabelSet",
					"ZValue": [
						{
							"ZType": "ZMonoLingualLabel",
							"ZLanguageCode": "en",
							"ZValue": "whether to use the Oxford comma or not"
						},
						{
							"ZType": "ZMonoLingualLabel",
							"ZLanguageCode": "it",
							"ZValue": "se usare o meno la virgola di Oxford"
						}
					]
				}
			},
			{
				"ZType": "ZArgumentDeclaration",
				"ZArgumentDeclaration": "ZLanguageCode",
				"ZArgumentRequirement": "Zfalse",
				"ZLabel": {
					"ZType": "ZMultiLingualLabelSet",
					"ZValue": [
						{
							"ZType": "ZMonoLingualLabel",
							"ZLanguageCode": "en",
							"ZValue": "language"
						},
						{
							"ZType": "ZMonoLingualLabel",
							"ZLanguageCode": "it",
							"ZValue": "linguaggio"
						}
					]
				},
				"ZDesc": {
					"ZType": "ZMultiLingualLabelSet",
					"ZValue": [
						{
							"ZType": "ZMonoLingualLabel",
							"ZLanguageCode": "en",
							"ZValue": "in which language to conjunct these nouns, if not that of the given input"
						},
						{
							"ZType": "ZMonoLingualLabel",
							"ZLanguageCode": "it",
							"ZValue": "in quale lingua congiungere questi sostantivi, se non quello dell'input dato"
						}
					]
				}
			}
		],
		"ZFunction_output": "ZString",
		"ZFunction_tests": [
			"Z1234",
			"Z1236",
			"Z1239"
		]
	}
}

Looks good! Same comments like on the other pase.

One thing additionally here: this is fine for simple strings, but in fact these should be noun phrases, because they need to support declension. But that's really for quite a bit later. We probably will have a string-based declension too, but then we likely don't need the language parameter.