Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://gricad-gitlab.univ-grenoble-alpes.fr/coavouxm/flaubertagger.git
09 April 2024, 05:01:41 UTC
  • Code
  • Branches (1)
  • Releases (0)
  • Visits
    • Branches
    • Releases
    • HEAD
    • refs/heads/master
    • c939ca9fac094ac3c379256ef3d3d4d14a5a4bf1
    No releases to show
  • 388777f
  • /
  • src
  • /
  • conll2txt.py
Raw File Download
Take a new snapshot of a software origin

If the archived software origin currently browsed is not synchronized with its upstream version (for instance when new commits have been issued), you can explicitly request Software Heritage to take a new snapshot of it.

Use the form below to proceed. Once a request has been submitted and accepted, it will be processed as soon as possible. You can then check its processing state by visiting this dedicated page.
swh spinner

Processing "take a new snapshot" request ...

Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
  • revision
  • snapshot
origin badgecontent badge Iframe embedding
swh:1:cnt:1e23f383f8eb8e162e32528be60f152f742f4519
origin badgedirectory badge Iframe embedding
swh:1:dir:c69bc28a718a9d9be4f56505734cbb90b23d2ead
origin badgerevision badge
swh:1:rev:c939ca9fac094ac3c379256ef3d3d4d14a5a4bf1
origin badgesnapshot badge
swh:1:snp:82db0a85833d76805a36c23f8377236abee4ebea
Citations

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
  • revision
  • snapshot
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Tip revision: c939ca9fac094ac3c379256ef3d3d4d14a5a4bf1 authored by m on 23 February 2024, 16:44:50 UTC
up
Tip revision: c939ca9
conll2txt.py



if __name__ == "__main__":
    import argparse
    
    parser = argparse.ArgumentParser(description = "Conll 2 text", formatter_class=argparse.ArgumentDefaultsHelpFormatter)

    parser.add_argument("input", help="Input conll file")
    parser.add_argument("--output", help="Output text (default = <input>.tokens")
    parser.add_argument("--ignore-header", action="store_true", help="Ignore header")
    parser.add_argument("-i", type=int, default=1, help="column id")
    
    args = parser.parse_args()

    output = f"{args.input}.tokens"
    if args.output is not None:
        output = args.output
        
    with open(args.input, encoding="utf8") as f, open(output, "w", encoding="utf8") as o:
        if args.ignore_header:
            f.readline()
        sentences = f.read().split("\n\n")
        
        for sentence in sentences:
            if sentence.strip():
                
                tokens = sentence.split("\n")
                tokens = [line.split("\t")[args.i] for line in tokens if line.strip()]
                if len(tokens) > 0:
                    o.write(f"{' '.join(tokens)}\n")

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Contact— JavaScript license information— Web API

back to top