{
  "_id": "6a1bf8301d7bb097a0a271a9",
  "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-05-31 08:53:09 UTC",
    "User": "root"
  },
  "Author": "Valerio Gherardi [aut, cre] (ORCID:\n<https://orcid.org/0000-0002-8215-3013>)",
  "Maintainer": "Valerio Gherardi <vgherard840@gmail.com>",
  "MD5sum": "fc90277b72d9642eb1a6fa2a5a946118",
  "_user": "vgherard",
  "_type": "src",
  "_file": "kgrams_0.2.1.tar.gz",
  "_fileid": "d13d0c12671ce012a06f2e06e77d88da120cedbfaf529b9e1ea84397e4426160",
  "_filesize": 428607,
  "_sha256": "d13d0c12671ce012a06f2e06e77d88da120cedbfaf529b9e1ea84397e4426160",
  "_created": "2026-05-31T08:53:09.000Z",
  "_published": "2026-05-31T08:58:24.217Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 78713475742,
      "time": 161,
      "config": "linux-devel-arm64",
      "r": "4.7.0",
      "check": "NOTE",
      "artifact": "7315395805"
    },
    {
      "job": 78713475733,
      "time": 177,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "NOTE",
      "artifact": "7315397290"
    },
    {
      "job": 78713475739,
      "time": 157,
      "config": "linux-release-arm64",
      "r": "4.6.0",
      "check": "NOTE",
      "artifact": "7315395533"
    },
    {
      "job": 78713475743,
      "time": 165,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "NOTE",
      "artifact": "7315396231"
    },
    {
      "job": 78713475672,
      "time": 147,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "NOTE",
      "artifact": "7315394403"
    },
    {
      "job": 78713475677,
      "time": 246,
      "config": "macos-oldrel-x86_64",
      "r": "4.5.3",
      "check": "NOTE",
      "artifact": "7315403564"
    },
    {
      "job": 78713475682,
      "time": 177,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "NOTE",
      "artifact": "7315397100"
    },
    {
      "job": 78713475680,
      "time": 205,
      "config": "macos-release-x86_64",
      "r": "4.6.0",
      "check": "NOTE",
      "artifact": "7315399808"
    },
    {
      "job": 78713214772,
      "time": 268,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7315380951"
    },
    {
      "job": 78713475659,
      "time": 120,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7315392174"
    },
    {
      "job": 78713475737,
      "time": 232,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "NOTE",
      "artifact": "7315402407"
    },
    {
      "job": 78713475736,
      "time": 202,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "NOTE",
      "artifact": "7315400057"
    },
    {
      "job": 78713475694,
      "time": 207,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "NOTE",
      "artifact": "7315400029"
    }
  ],
  "_buildurl": "https://github.com/r-universe/vgherard/actions/runs/26708126821",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/vgherard/kgrams",
  "_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
  },
  "_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
  },
  "_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",
    "description": "|physicist>   +   |data scientist>"
  },
  "_downloads": {
    "count": 673,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/kgrams"
  },
  "_devurl": "https://github.com/vgherard/kgrams",
  "_pkgdown": "https://vgherard.github.io/kgrams/",
  "_searchresults": 17,
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/kgrams.html",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md",
    "manual.pdf"
  ],
  "_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": "14.2.0-4ubuntu2~24.04.1",
      "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.251638220448212,
  "_indexed": true,
  "_nocasepkg": "kgrams",
  "_universes": [
    "vgherard"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.2.1",
      "date": "2026-05-31T08:55:46.000Z",
      "distro": "noble",
      "arch": "aarch64",
      "commit": "bf86cee71acc90aa00fd5d570cebebc293359486",
      "fileid": "15db98bb90517bf5b8ac871485eb1a569e55f46741b884ea3f25625e00c18976",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/vgherard/actions/runs/26708126821"
    },
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.2.1",
      "date": "2026-05-31T08:55:56.000Z",
      "distro": "noble",
      "arch": "x86_64",
      "commit": "bf86cee71acc90aa00fd5d570cebebc293359486",
      "fileid": "f594fa2690fab4a66577859c832857ce78fcda6fc4f5b98cfee3bd5dd14b059e",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/vgherard/actions/runs/26708126821"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "0.2.1",
      "date": "2026-05-31T08:55:44.000Z",
      "distro": "noble",
      "arch": "aarch64",
      "commit": "bf86cee71acc90aa00fd5d570cebebc293359486",
      "fileid": "dffc0017ff5720a6a6be170709df2fb28c781879f5dcf3fc8a787dfecc0ae87f",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/vgherard/actions/runs/26708126821"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "0.2.1",
      "date": "2026-05-31T08:55:47.000Z",
      "distro": "noble",
      "arch": "x86_64",
      "commit": "bf86cee71acc90aa00fd5d570cebebc293359486",
      "fileid": "1bace45a9852de14223ccfe6da3b21cd76c8bc8686639e323af273c60add7bd8",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/vgherard/actions/runs/26708126821"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.2.1",
      "date": "2026-05-31T08:55:37.000Z",
      "arch": "aarch64",
      "commit": "bf86cee71acc90aa00fd5d570cebebc293359486",
      "fileid": "717842c7e6000c6058aa986939d30d6b031caf265a5c92b7872dff5c9b97e8f4",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/vgherard/actions/runs/26708126821"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.2.1",
      "date": "2026-05-31T08:56:19.000Z",
      "arch": "x86_64",
      "commit": "bf86cee71acc90aa00fd5d570cebebc293359486",
      "fileid": "07ea0192eec4460de69695278ab0c1af648aed3e2c56ad91e55e1e84ac175970",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/vgherard/actions/runs/26708126821"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "0.2.1",
      "date": "2026-05-31T08:55:50.000Z",
      "arch": "aarch64",
      "commit": "bf86cee71acc90aa00fd5d570cebebc293359486",
      "fileid": "b9d85c4247f876ce1422952821b780dae8f2bd3f6386d16ad6bb243a3615b700",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/vgherard/actions/runs/26708126821"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "0.2.1",
      "date": "2026-05-31T08:56:02.000Z",
      "arch": "x86_64",
      "commit": "bf86cee71acc90aa00fd5d570cebebc293359486",
      "fileid": "02eadc7b106cce9e0ed3d9277d0e915a81f4e389c034f2e4e62466940afa413f",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/vgherard/actions/runs/26708126821"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "0.2.1",
      "date": "2026-05-31T08:55:45.000Z",
      "arch": "emscripten",
      "commit": "bf86cee71acc90aa00fd5d570cebebc293359486",
      "fileid": "6f10de29344c5e7e63ec22d81a1484087710cf34be5fd6904bd17aa0aaf10d64",
      "status": "success",
      "buildurl": "https://github.com/r-universe/vgherard/actions/runs/26708126821"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.2.1",
      "date": "2026-05-31T08:55:27.000Z",
      "arch": "x86_64",
      "commit": "bf86cee71acc90aa00fd5d570cebebc293359486",
      "fileid": "3763f5b3d5a961040db8ca23b58883f09f35f7b4ef833e3584a44bb712d8cf7e",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/vgherard/actions/runs/26708126821"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "0.2.1",
      "date": "2026-05-31T08:55:22.000Z",
      "arch": "x86_64",
      "commit": "bf86cee71acc90aa00fd5d570cebebc293359486",
      "fileid": "f9b5ba9f7f5122dea84a9cf1107ddc2d2ff01647e01bd6d1238bc8d66ea059ea",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/vgherard/actions/runs/26708126821"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "0.2.1",
      "date": "2026-05-31T08:55:02.000Z",
      "arch": "x86_64",
      "commit": "bf86cee71acc90aa00fd5d570cebebc293359486",
      "fileid": "47054f1c66cc1069a1ab9576d30dce40f9fcb733246046e05cd07fa6dfc349e6",
      "status": "success",
      "check": "NOTE",
      "buildurl": "https://github.com/r-universe/vgherard/actions/runs/26708126821"
    }
  ]
}