{
  "_id": "6ad9b77c992ad85420b5fb1b",
  "Package": "kgrams",
  "Title": "Classical k-gram Language Models",
  "Version": "0.2.1",
  "Authors@R": "person(given = \"Valerio\",\nfamily = \"Gherardi\",\nrole = c(\"aut\", \"cre\"),\nemail = \"vgherard840@gmail.com\",\ncomment = c(ORCID = \"0000-0002-8215-3013\"))",
  "Description": "Training and evaluating k-gram language models in R,\nsupporting several probability smoothing techniques, perplexity\ncomputations, random text generation and more.",
  "License": "GPL (>= 3)",
  "Encoding": "UTF-8",
  "LazyData": "true",
  "Roxygen": "list(markdown = TRUE, roclets = c (\"namespace\", \"rd\"))",
  "RoxygenNote": "7.3.2",
  "Config/testthat/edition": "3",
  "RdMacros": "Rdpack",
  "VignetteBuilder": "knitr",
  "URL": "https://vgherard.github.io/kgrams/,\nhttps://github.com/vgherard/kgrams",
  "BugReports": "https://github.com/vgherard/kgrams/issues",
  "Repository": "https://vgherard.r-universe.dev",
  "Date/Publication": "2024-11-13 08:22:45 UTC",
  "RemoteUrl": "https://github.com/vgherard/kgrams",
  "RemoteRef": "v0.2.1",
  "RemoteSha": "bf86cee71acc90aa00fd5d570cebebc293359486",
  "NeedsCompilation": "yes",
  "Packaged": {
    "Date": "2026-10-22 07:02:54 UTC",
    "User": "root"
  },
  "Author": "Valerio Gherardi [aut, cre] (ORCID:\n<https://orcid.org/0000-0002-8215-3013>)",
  "Maintainer": "Valerio Gherardi <vgherard840@gmail.com>",
  "_user": "vgherard",
  "_type": "src",
  "_file": "kgrams_0.2.1.tar.gz",
  "_fileid": "https://r2.ropensci.org/fc71727be8acb43ffb15997b9853b6bf3ef402df51d7b72e60461c61842b4e91",
  "_filesize": 431127,
  "_sha256": "fc71727be8acb43ffb15997b9853b6bf3ef402df51d7b72e60461c61842b4e91",
  "_expires": "2027-01-30T07:12:58.000Z",
  "_created": "2026-10-22T07:02:54.000Z",
  "_published": "2026-10-22T07:13:00.066Z",
  "_upstream": "https://github.com/vgherard/kgrams",
  "_status": "success",
  "_maintainer": {
    "name": "Valerio Gherardi",
    "email": "vgherard840@gmail.com",
    "login": "vgherard",
    "linkedin": "in/vgherard",
    "orcid": "0000-0002-8215-3013",
    "twitter": "@ValerioGherardi",
    "description": "|physicist>   +   |data scientist>",
    "uuid": 62836440
  },
  "_jobs": [
    {
      "job": 119687945640,
      "time": 148,
      "config": "linux-devel-arm64",
      "r": "4.7.0",
      "check": "NOTE",
      "artifact": "12408445531"
    },
    {
      "job": 119687945372,
      "time": 190,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "NOTE",
      "artifact": "12408535337"
    },
    {
      "job": 119687945412,
      "time": 182,
      "config": "linux-release-arm64",
      "r": "4.6.1",
      "check": "NOTE",
      "artifact": "12408380777"
    },
    {
      "job": 119687945758,
      "time": 147,
      "config": "linux-release-x86_64",
      "r": "4.6.1",
      "check": "NOTE",
      "artifact": "12406829850"
    },
    {
      "job": 119687945504,
      "time": 162,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "NOTE",
      "artifact": "12408660029"
    },
    {
      "job": 119687945449,
      "time": 346,
      "config": "macos-oldrel-x86_64",
      "r": "4.5.3",
      "check": "NOTE",
      "artifact": "12408236535"
    },
    {
      "job": 119687945390,
      "time": 143,
      "config": "macos-release-arm64",
      "r": "4.6.1",
      "check": "NOTE",
      "artifact": "12408335809"
    },
    {
      "job": 119687945477,
      "time": 526,
      "config": "macos-release-x86_64",
      "r": "4.6.1",
      "check": "NOTE",
      "artifact": "12408386839"
    },
    {
      "job": 119686185163,
      "time": 290,
      "config": "source",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "12407917655"
    },
    {
      "job": 119687946011,
      "time": 120,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "12407024555"
    },
    {
      "job": 119687945452,
      "time": 401,
      "config": "windows-devel-arm64",
      "r": "4.7.0",
      "check": "NOTE",
      "artifact": "12407594160"
    },
    {
      "job": 119687945760,
      "time": 213,
      "config": "windows-devel-x86_64",
      "r": "4.7.0",
      "check": "NOTE",
      "artifact": "12408041748"
    },
    {
      "job": 119687945418,
      "time": 159,
      "config": "windows-oldrel-x86_64",
      "r": "4.5.3",
      "check": "NOTE",
      "artifact": "12408151324"
    },
    {
      "job": 119687945871,
      "time": 391,
      "config": "windows-release-arm64",
      "r": "4.6.1",
      "check": "NOTE",
      "artifact": "12408316530"
    },
    {
      "job": 119687945674,
      "time": 167,
      "config": "windows-release-x86_64",
      "r": "4.6.1",
      "check": "NOTE",
      "artifact": "12408096702"
    }
  ],
  "_buildurl": "https://github.com/r-universe/vgherard/actions/runs/39737343281",
  "_commit": {
    "id": "bf86cee71acc90aa00fd5d570cebebc293359486",
    "author": "Valerio Gherardi <vgherard840@gmail.com>",
    "committer": "Valerio Gherardi <vgherard840@gmail.com>",
    "message": "Update CRAN comments for v0.2.1 submission\n",
    "time": 1731486165
  },
  "_distro": "resolute",
  "_host": "GitHub-Actions",
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 4.0",
      "role": "Depends"
    },
    {
      "package": "Rcpp",
      "role": "LinkingTo"
    },
    {
      "package": "RcppProgress",
      "role": "LinkingTo"
    },
    {
      "package": "Rcpp",
      "role": "Imports"
    },
    {
      "package": "rlang",
      "role": "Imports"
    },
    {
      "package": "methods",
      "role": "Imports"
    },
    {
      "package": "utils",
      "role": "Imports"
    },
    {
      "package": "RcppProgress",
      "version": ">= 0.1",
      "role": "Imports"
    },
    {
      "package": "Rdpack",
      "role": "Imports"
    },
    {
      "package": "testthat",
      "version": ">= 3.0.0",
      "role": "Suggests"
    },
    {
      "package": "covr",
      "role": "Suggests"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    },
    {
      "package": "tibble",
      "role": "Suggests"
    }
  ],
  "_owner": "vgherard",
  "_selfowned": true,
  "_usedby": 1,
  "_updates": [],
  "_tags": [],
  "_topics": [
    "language-models",
    "n-grams",
    "natural-language-processing",
    "cpp"
  ],
  "_stars": 7,
  "_contributors": [
    {
      "user": "vgherard",
      "count": 27,
      "uuid": 62836440
    }
  ],
  "_userbio": {
    "uuid": 62836440,
    "type": "user",
    "name": "Valerio Gherardi",
    "followers": 14,
    "description": "|physicist>   +   |data scientist>"
  },
  "_downloads": {
    "count": 484,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/kgrams"
  },
  "_devurl": "https://github.com/vgherard/kgrams",
  "_pkgdown": "https://vgherard.github.io/kgrams/",
  "_searchresults": 19,
  "_rbuild": "4.6.1",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/kgrams.html",
    "extra/manual.pdf",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md"
  ],
  "_homeurl": "https://github.com/vgherard/kgrams",
  "_realowner": "vgherard",
  "_cranurl": true,
  "_releases": [
    {
      "version": "0.1.0",
      "date": "2021-02-15"
    },
    {
      "version": "0.1.2",
      "date": "2021-11-16"
    },
    {
      "version": "0.1.5",
      "date": "2023-04-18"
    },
    {
      "version": "0.2.0",
      "date": "2023-10-06"
    },
    {
      "version": "0.2.1",
      "date": "2024-11-14"
    }
  ],
  "_exports": [
    "%+%",
    "%|%",
    "as_dictionary",
    "BOS",
    "dictionary",
    "EOS",
    "info",
    "kgram_freqs",
    "language_model",
    "param",
    "param<-",
    "parameters",
    "perplexity",
    "preprocess",
    "probability",
    "process_sentences",
    "query",
    "sample_sentences",
    "smoothers",
    "tknz_sent",
    "UNK"
  ],
  "_datasets": [
    {
      "name": "midsummer",
      "title": "A Midsummer Night's Dream",
      "object": "midsummer",
      "class": [
        "character"
      ],
      "fields": [],
      "table": false,
      "tojson": true
    },
    {
      "name": "much_ado",
      "title": "Much Ado About Nothing",
      "object": "much_ado",
      "class": [
        "character"
      ],
      "fields": [],
      "table": false,
      "tojson": true
    }
  ],
  "_help": [
    {
      "page": "grapes-plus-grapes",
      "title": "String concatenation",
      "topics": [
        "%+%"
      ]
    },
    {
      "page": "dictionary",
      "title": "Word dictionaries",
      "topics": [
        "as.character.kgrams_dictionary",
        "as_dictionary",
        "as_dictionary.character",
        "as_dictionary.kgrams_dictionary",
        "dictionary",
        "dictionary.character",
        "dictionary.connection",
        "dictionary.kgram_freqs"
      ]
    },
    {
      "page": "special_tokens",
      "title": "Special Tokens",
      "topics": [
        "BOS",
        "EOS",
        "special_tokens",
        "UNK"
      ]
    },
    {
      "page": "kgram_freqs",
      "title": "k-gram Frequency Tables",
      "topics": [
        "kgram_freqs",
        "kgram_freqs.character",
        "kgram_freqs.connection",
        "kgram_freqs.kgram_freqs",
        "kgram_freqs.numeric",
        "process_sentences",
        "process_sentences.character",
        "process_sentences.connection"
      ]
    },
    {
      "page": "language_model",
      "title": "k-gram Language Models",
      "topics": [
        "language_model",
        "language_model.kgram_freqs",
        "language_model.language_model"
      ]
    },
    {
      "page": "midsummer",
      "title": "A Midsummer Night's Dream",
      "topics": [
        "midsummer"
      ]
    },
    {
      "page": "much_ado",
      "title": "Much Ado About Nothing",
      "topics": [
        "much_ado"
      ]
    },
    {
      "page": "parameters",
      "title": "Language Model Parameters",
      "topics": [
        "param",
        "param.kgram_freqs",
        "param<-",
        "parameters"
      ]
    },
    {
      "page": "perplexity",
      "title": "Language Model Perplexities",
      "topics": [
        "perplexity",
        "perplexity.character",
        "perplexity.connection"
      ]
    },
    {
      "page": "preprocess",
      "title": "Text preprocessing",
      "topics": [
        "preprocess"
      ]
    },
    {
      "page": "probability",
      "title": "Language Model Probabilities",
      "topics": [
        "probability",
        "probability.character",
        "probability.kgrams_word_context"
      ]
    },
    {
      "page": "query",
      "title": "Query k-gram frequency tables or dictionaries",
      "topics": [
        "query",
        "query.kgrams_dictionary",
        "query.kgram_freqs"
      ]
    },
    {
      "page": "sample_sentences",
      "title": "Random Text Generation",
      "topics": [
        "sample_sentences"
      ]
    },
    {
      "page": "smoothers",
      "title": "k-gram Probability Smoothers",
      "topics": [
        "info",
        "smoothers"
      ]
    },
    {
      "page": "tknz_sent",
      "title": "Sentence tokenizer",
      "topics": [
        "tknz_sent"
      ]
    },
    {
      "page": "word_context",
      "title": "Word-context conditional expression",
      "topics": [
        "%|%",
        "word_context"
      ]
    }
  ],
  "_readme": "https://github.com/vgherard/kgrams/raw/v0.2.1/README.md",
  "_rundeps": [
    "rbibutils",
    "Rcpp",
    "RcppProgress",
    "Rdpack",
    "rlang"
  ],
  "_sysdeps": [
    {
      "shlib": "libstdc++",
      "package": "libstdc++6",
      "source": "gcc",
      "version": "16-20260322-1ubuntu1",
      "name": "c++",
      "homepage": "http://gcc.gnu.org/",
      "description": "GNU Standard C++ Library v3"
    }
  ],
  "_vignettes": [
    {
      "source": "kgrams.Rmd",
      "filename": "kgrams.html",
      "title": "Classical $k$-gram Language Models in R",
      "author": "Valerio Gherardi",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "Building a $k$-gram language model",
        "Step 1: Loading the training corpus",
        "Step 2: preprocessing and tokenizing sentences",
        "Step 3: get $k$-gram frequency counts",
        "Step 4. Build the final language model",
        "Using language_model objects",
        "Word continuation and sentence probabilities",
        "Generating random text",
        "Compute language model's perplexities",
        "Conclusions",
        "References"
      ],
      "created": "2021-02-06 18:04:34",
      "modified": "2023-10-06 10:21:22",
      "commits": 9
    }
  ],
  "_score": 5.299942900022767,
  "_indexed": true,
  "_nocasepkg": "kgrams",
  "_universes": [
    "vgherard"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.2.1",
      "date": "2026-10-22T07:05:17.000Z",
      "distro": "resolute",
      "arch": "aarch64",
      "commit": "bf86cee71acc90aa00fd5d570cebebc293359486",
      "fileid": "https://r2.ropensci.org/f13cab8d3858b4bcc438fcbbdd19b63cfaf20d69b4dc2f81334ee2839f12dd50",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/vgherard/actions/runs/39737343281"
    },
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.2.1",
      "date": "2026-10-22T07:05:57.000Z",
      "distro": "resolute",
      "arch": "x86_64",
      "commit": "bf86cee71acc90aa00fd5d570cebebc293359486",
      "fileid": "https://r2.ropensci.org/68f786be7c7a4ecc4549d8d900501a4f071d06d7fb5ec71bbe76df21c08ded16",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/vgherard/actions/runs/39737343281"
    },
    {
      "r": "4.6.1",
      "os": "linux",
      "version": "0.2.1",
      "date": "2026-10-22T07:05:50.000Z",
      "distro": "resolute",
      "arch": "aarch64",
      "commit": "bf86cee71acc90aa00fd5d570cebebc293359486",
      "fileid": "https://r2.ropensci.org/6389aab194524aeb4b3a6447c06fb587a1bc1e8963df67da43114f8063bfe2fe",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/vgherard/actions/runs/39737343281"
    },
    {
      "r": "4.6.1",
      "os": "linux",
      "version": "0.2.1",
      "date": "2026-10-22T07:05:25.000Z",
      "distro": "resolute",
      "arch": "x86_64",
      "commit": "bf86cee71acc90aa00fd5d570cebebc293359486",
      "fileid": "https://r2.ropensci.org/3289b0852aa380b17d6ac7d9bd607144b4f23baede91dd83ab18e1148f2e41cc",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/vgherard/actions/runs/39737343281"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.2.1",
      "date": "2026-10-22T07:05:26.000Z",
      "arch": "aarch64",
      "commit": "bf86cee71acc90aa00fd5d570cebebc293359486",
      "fileid": "https://r2.ropensci.org/7f4ae542ca59023557576d0495b69d7b984bb96fa73935d9bc3c89dcd63e82ed",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/vgherard/actions/runs/39737343281"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.2.1",
      "date": "2026-10-22T07:07:29.000Z",
      "arch": "x86_64",
      "commit": "bf86cee71acc90aa00fd5d570cebebc293359486",
      "fileid": "https://r2.ropensci.org/1156128b09fb08b4accb4a596c077c4164c0d835bf36b5077f29e22571bb8333",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/vgherard/actions/runs/39737343281"
    },
    {
      "r": "4.6.1",
      "os": "mac",
      "version": "0.2.1",
      "date": "2026-10-22T07:05:18.000Z",
      "arch": "aarch64",
      "commit": "bf86cee71acc90aa00fd5d570cebebc293359486",
      "fileid": "https://r2.ropensci.org/5f9d7e0571cdc2470a38d3e8dece2bb2538a05287165ae43d420f63e615dd511",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/vgherard/actions/runs/39737343281"
    },
    {
      "r": "4.6.1",
      "os": "mac",
      "version": "0.2.1",
      "date": "2026-10-22T07:07:51.000Z",
      "arch": "x86_64",
      "commit": "bf86cee71acc90aa00fd5d570cebebc293359486",
      "fileid": "https://r2.ropensci.org/3beaa7a3fa553f2915e71cd26b4339294aeecd62eb1bd19bee1ee3e747a8312c",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/vgherard/actions/runs/39737343281"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "0.2.1",
      "date": "2026-10-22T07:05:25.000Z",
      "arch": "emscripten",
      "commit": "bf86cee71acc90aa00fd5d570cebebc293359486",
      "fileid": "https://r2.ropensci.org/c9de42e6991f1d6b86e0c14e8f317e666273343fe40bfe407d29ac9bb5ad3466",
      "status": "success",
      "buildurl": "https://github.com/r-universe/vgherard/actions/runs/39737343281"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.2.1",
      "date": "2026-10-22T07:08:49.000Z",
      "arch": "aarch64",
      "commit": "bf86cee71acc90aa00fd5d570cebebc293359486",
      "fileid": "https://r2.ropensci.org/2c6ad0c47367ce5cd2f6e87dc2aca2a7f9a88092c67d1d54e21b1c13b787d445",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/vgherard/actions/runs/39737343281"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.2.1",
      "date": "2026-10-22T07:04:45.000Z",
      "arch": "x86_64",
      "commit": "bf86cee71acc90aa00fd5d570cebebc293359486",
      "fileid": "https://r2.ropensci.org/94327008116c775c40cc0927b8245beb6cd1a366a309f420f54e42aa0c0d03b0",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/vgherard/actions/runs/39737343281"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "0.2.1",
      "date": "2026-10-22T07:04:42.000Z",
      "arch": "x86_64",
      "commit": "bf86cee71acc90aa00fd5d570cebebc293359486",
      "fileid": "https://r2.ropensci.org/8b1981c67afc90ca9eb96c93818095f28929e2455f076ef971e2725a2a842c89",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/vgherard/actions/runs/39737343281"
    },
    {
      "r": "4.6.1",
      "os": "win",
      "version": "0.2.1",
      "date": "2026-10-22T07:08:25.000Z",
      "arch": "aarch64",
      "commit": "bf86cee71acc90aa00fd5d570cebebc293359486",
      "fileid": "https://r2.ropensci.org/eacf4a3060732d806bceda5cf0afc3fdd284a174cfdb2cca7902b43257455a19",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/vgherard/actions/runs/39737343281"
    },
    {
      "r": "4.6.1",
      "os": "win",
      "version": "0.2.1",
      "date": "2026-10-22T07:04:38.000Z",
      "arch": "x86_64",
      "commit": "bf86cee71acc90aa00fd5d570cebebc293359486",
      "fileid": "https://r2.ropensci.org/03ab8c5181877dd6d31b2cc3738e0962cf2bbb9d8d1e5e0cc22f0fafd18b2d9a",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/vgherard/actions/runs/39737343281"
    }
  ]
}