Download chatcode/create_article_examples.py from gamedevelop/pocketvision-chat-code: direct link, hf CLI and curl.
- Browser
- Download file 4.47 kB
-
https://huggingface.co/gamedevelop/pocketvision-chat-code/resolve/main/chatcode/create_article_examples.py
- Command line
-
hf download hf://gamedevelop/pocketvision-chat-code/chatcode/create_article_examples.py
-
curl -L -o create_article_examples.py https://huggingface.co/gamedevelop/pocketvision-chat-code/resolve/main/chatcode/create_article_examples.py
4.47 kB
| """Build small authored behavior examples; these fictional packets are not factual training data.""" | |
| import json | |
| from pathlib import Path | |
| def build(): | |
| # Deliberately fictional topics and reserved example.org URLs avoid presenting | |
| # synthetic bibliography entries as genuine research or real model outputs. | |
| specifications = [ | |
| ("alder", "train", "Alder Valley Observatory", "an astronomical observatory", "2008", | |
| "opened to visitors", "2014", "added a public telescope-viewing programme"), | |
| ("birch", "train", "Birch Harbour Library", "a public library", "1996", | |
| "opened its reading room", "2011", "introduced a local-history collection"), | |
| ("cedar", "train", "Cedar Ridge Railway Museum", "a transport museum", "1982", | |
| "opened a collection of railway equipment", "2005", "added a carriage-restoration workshop"), | |
| ("dune", "train", "Dune Field Wetland Reserve", "a wetland reserve", "2001", | |
| "opened a marked visitor trail", "2017", "introduced seasonal bird counts"), | |
| ("elm", "train", "Elm River Chamber Ensemble", "a chamber music ensemble", "1993", | |
| "gave its first documented public concert", "2010", "began an annual series of school concerts"), | |
| ("fern", "train", "Fern Coast Maritime Archive", "a maritime archive", "1978", | |
| "opened a reading room", "2009", "began digitising shipping registers"), | |
| ("glen", "validation", "Glen Brook Textile Museum", "a textile museum", "1987", | |
| "opened a loom display", "2013", "introduced demonstrations of weaving techniques"), | |
| ("hazel", "validation", "Hazel Plain Seed Library", "a community seed library", "2006", | |
| "started lending seed packets", "2018", "added workshops on seed storage"), | |
| ("iris", "test", "Iris Bay Community Theatre", "a community theatre", "1999", | |
| "staged its first documented production", "2016", "introduced a youth drama workshop"), | |
| ("juniper", "test", "Juniper Hill Geological Centre", "a geology education centre", "2003", | |
| "opened a rock collection", "2019", "added guided geology walks"), | |
| ] | |
| packets = [] | |
| for key, split, name, category, first_year, event, second_year, activity in specifications: | |
| topic = f"{name} (fictional practice topic)" | |
| rows = [ | |
| [f"Practice Gazette report about {name}", f"https://example.org/practice/{key}/report", | |
| f"Fictional practice material: {name} is {category}. It {event} in {first_year}."], | |
| [f"Practice Review account of {name}", f"https://example.org/practice/{key}/review", | |
| f"Fictional practice material: {name} {activity} in {second_year}. No founder or visitor total is stated."], | |
| ] | |
| article = { | |
| "lead": [{"text": f"{name} is {category} in a fictional practice setting.", "sources": ["S1"]}], | |
| "sections": [{"heading": "Development", "paragraphs": [ | |
| {"text": f"The organisation {event} in {first_year}.", "sources": ["S1"]}, | |
| {"text": f"It {activity} in {second_year}.", "sources": ["S2"]}]}], | |
| "gaps": ["The supplied excerpts do not identify a founder or provide visitor figures.", | |
| "These are fictional practice sources, not evidence of a real topic's notability."], | |
| } | |
| outline = {"sections": [{"heading": "History and activities", "questions": [ | |
| "Which dated milestones do the supplied excerpts support?", | |
| "What further independent coverage would a human editor need?"], "sources": ["S1", "S2"]}], | |
| "gaps": ["Do not draft article prose for English Wikipedia using an LLM.", | |
| "These fictional sources cannot establish a real subject's notability."]} | |
| packets.append({"id": key, "split": split, "topic": topic, "sources": rows, | |
| "article_target": article, "outline_target": outline}) | |
| payload = {"license": "GPL-3.0-only", "authorship": "Project-authored synthetic behavior examples", | |
| "limitations": "Fictional topics and reserved URLs. Not real references, model outputs, or accuracy evidence.", | |
| "packets": packets} | |
| return payload | |
| if __name__ == "__main__": | |
| path = Path(__file__).with_name("article_examples.json") | |
| path.write_text(json.dumps(build(), ensure_ascii=False, indent=2), encoding="utf-8") | |
| print(f"Wrote {path}") | |