Software Open Access

detect-delimiter software project

McNamara, Timothy S


JSON Export

{
  "files": [
    {
      "links": {
        "self": "https://zenodo.org/api/files/da7d47f3-6c66-4d82-926a-e93a861838cf/detect_delimiter-0.1.1.tar.gz"
      }, 
      "checksum": "md5:768cebf9960d9c9f2ba4168f315fcf68", 
      "bucket": "da7d47f3-6c66-4d82-926a-e93a861838cf", 
      "key": "detect_delimiter-0.1.1.tar.gz", 
      "type": "gz", 
      "size": 3100
    }
  ], 
  "owners": [
    47559
  ], 
  "doi": "10.5281/zenodo.1323186", 
  "stats": {
    "version_unique_downloads": 22.0, 
    "unique_views": 101.0, 
    "views": 112.0, 
    "version_views": 112.0, 
    "unique_downloads": 22.0, 
    "version_unique_views": 101.0, 
    "volume": 71300.0, 
    "version_downloads": 23.0, 
    "downloads": 23.0, 
    "version_volume": 71300.0
  }, 
  "links": {
    "doi": "https://doi.org/10.5281/zenodo.1323186", 
    "conceptdoi": "https://doi.org/10.5281/zenodo.1323185", 
    "bucket": "https://zenodo.org/api/files/da7d47f3-6c66-4d82-926a-e93a861838cf", 
    "conceptbadge": "https://zenodo.org/badge/doi/10.5281/zenodo.1323185.svg", 
    "html": "https://zenodo.org/record/1323186", 
    "latest_html": "https://zenodo.org/record/1323186", 
    "badge": "https://zenodo.org/badge/doi/10.5281/zenodo.1323186.svg", 
    "latest": "https://zenodo.org/api/records/1323186"
  }, 
  "conceptdoi": "10.5281/zenodo.1323185", 
  "created": "2018-07-29T04:55:22.621606+00:00", 
  "updated": "2020-01-25T19:21:53.927344+00:00", 
  "conceptrecid": "1323185", 
  "revision": 5, 
  "id": 1323186, 
  "metadata": {
    "access_right_category": "success", 
    "doi": "10.5281/zenodo.1323186", 
    "description": "<p>Data sharing and research collaboration is hindered when messy data is released. Despite this, it still exists. detect-delimiter aims to provide tools with an option for inspecting the header of a text file and checking the actual delimiter used, rather than blindly believing the file extension.</p>\n\n<p><strong>Usage</strong></p>\n\n<p>The detect_delimiter module exposes the detect() functinon, which takes a str as input and returns a delimiter.</p>\n\n<pre><code class=\"language-python\">&gt;&gt;&gt; from detect_delimiter import detect\n&gt;&gt;&gt; detect(\"looks|like|the vertical bar\\n is|the|delimiter\\n\")\n'|'</code></pre>\n\n<p>When detect() doesn&#39;t know, it returns None:</p>\n\n<pre><code class=\"language-python\">&gt;&gt;&gt; text = \"not really any delimiters in here.\\nthis is just text.\\n\"\n&gt;&gt;&gt; detect()</code></pre>\n\n<p>It&#39;s possible to provide a default, which will be used in that case:</p>\n\n<pre><code class=\"language-python\">&gt;&gt;&gt; detect(text, default=',')\n','</code></pre>\n\n<p><br>\nBy default, detect() will prevent avoid checking alpha-numeric characters and the period/full stop character (&quot;.&quot;). This can be adjusted via the blacklist parameter.</p>\n\n<p>If you believe that you know the delimiter, it&#39;s possible to provide a list of possible delimiters to check for via the whitelist parameter. If you don&#39;t provide a value, [&#39;,&#39;, &#39;;&#39;, &#39;:&#39;, &#39;|&#39;, &#39;\\t&#39;] will be checked.</p>", 
    "language": "eng", 
    "title": "detect-delimiter software project", 
    "license": {
      "id": "CC-BY-4.0"
    }, 
    "notes": "This Python package can also be installed via \"pip\": \"pip install detect-delimiter\".", 
    "relations": {
      "version": [
        {
          "count": 1, 
          "index": 0, 
          "parent": {
            "pid_type": "recid", 
            "pid_value": "1323185"
          }, 
          "is_last": true, 
          "last_child": {
            "pid_type": "recid", 
            "pid_value": "1323186"
          }
        }
      ]
    }, 
    "version": "0.1.1", 
    "keywords": [
      "text processing", 
      "Python programming"
    ], 
    "publication_date": "2018-07-29", 
    "creators": [
      {
        "orcid": "0000-0002-2494-2700", 
        "affiliation": "DOT loves data", 
        "name": "McNamara, Timothy S"
      }
    ], 
    "access_right": "open", 
    "resource_type": {
      "type": "software", 
      "title": "Software"
    }, 
    "related_identifiers": [
      {
        "scheme": "doi", 
        "identifier": "10.5281/zenodo.1323185", 
        "relation": "isVersionOf"
      }
    ]
  }
}
112
23
views
downloads
All versions This version
Views 112112
Downloads 2323
Data volume 71.3 kB71.3 kB
Unique views 101101
Unique downloads 2222

Share

Cite as