{"id":15520776,"url":"https://github.com/proycon/spacy2folia","last_synced_at":"2025-07-09T06:08:01.761Z","repository":{"id":66967711,"uuid":"177275279","full_name":"proycon/spacy2folia","owner":"proycon","description":"Use spaCy for NLP and output to the FoLiA XML format.","archived":false,"fork":false,"pushed_at":"2024-02-27T21:46:42.000Z","size":29,"stargazers_count":12,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-02T02:41:54.608Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/proycon.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-03-23T10:29:11.000Z","updated_at":"2022-05-02T10:48:40.000Z","dependencies_parsed_at":"2025-04-23T04:42:57.891Z","dependency_job_id":null,"html_url":"https://github.com/proycon/spacy2folia","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/proycon/spacy2folia","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proycon%2Fspacy2folia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proycon%2Fspacy2folia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proycon%2Fspacy2folia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proycon%2Fspacy2folia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/proycon","download_url":"https://codeload.github.com/proycon/spacy2folia/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/proycon%2Fspacy2folia/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264403798,"owners_count":23602621,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-02T10:29:18.715Z","updated_at":"2025-07-09T06:08:01.741Z","avatar_url":"https://github.com/proycon.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Spacy-to-FoliA\n===================\n\n.. image:: https://travis-ci.com/proycon/foliapy.svg?branch=master\n    :target: https://travis-ci.com/proycon/spacy2folia\n\n.. image:: http://applejack.science.ru.nl/lamabadge.php/spacy2folia\n   :target: http://applejack.science.ru.nl/languagemachines/\n\nConvert Spacy output to `FoLiA XML \u003chttps://proycon.github.io/folia\u003e`_ Documents. Also supports FoLiA input.\n\nInstallation\n--------------\n\n``$ pip install spacy2folia``\n\nYou also need to install the spacy models you want like:\n\n``python -m spacy download en_core_web_sm``\n\nUsage Example\n----------------\n\nUsing the command line tool on an input file named ``test.txt``:\n\n``$ spacy2folia --model en_core_web_sm test.txt``\n\nThis results in a document ``test.folia.xml`` in the current working directory.\n\nYou can also invoke the command line tool on one or more FoLiA documents as input:\n\n``$ spacy2folia --model en_core_web_sm document.folia.xml``\n\nThe output file will be written to the currrent working directory (so it may overwirte the input if it's in the same\ndirectory!)\n\nUsage from Python:\n\n.. code:: python\n\n   import spacy\n   from spacy2folia import spacy2folia\n\n   text = \"Input text goes here\"\n\n   nlp = spacy.load(\"en_core_web_sm\")\n   doc = nlp(text)\n   foliadoc = spacy2folia.convert(doc, \"example\", paragraphs=True)\n   foliadoc.save(\"/tmp/output.folia.xml\")\n\nUsage from Python with FoLiA input:\n\n.. code:: python\n\n   import spacy\n   import folia.main as folia\n   from spacy2folia import spacy2folia\n\n   foliadoc = folia.Document(file=\"/tmp/input.folia.xml\")\n   nlp = spacy.load(\"en_core_web_sm\")\n   spacy2folia.convert_folia(foliadoc, nlp)\n   foliadoc.save(\"/tmp/output.folia.xml\")\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproycon%2Fspacy2folia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fproycon%2Fspacy2folia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproycon%2Fspacy2folia/lists"}