{"id":16274204,"url":"https://github.com/trinker/discon","last_synced_at":"2026-01-20T06:02:22.209Z","repository":{"id":27747193,"uuid":"31235117","full_name":"trinker/discon","owner":"trinker","description":"Tools for analyzing discourse connectors in text ","archived":false,"fork":false,"pushed_at":"2015-03-30T23:30:51.000Z","size":1400,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-08T16:33:15.151Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/trinker.png","metadata":{"files":{"readme":"README.Rmd","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}},"created_at":"2015-02-23T23:13:36.000Z","updated_at":"2020-01-03T11:31:04.000Z","dependencies_parsed_at":"2022-09-03T05:10:59.780Z","dependency_job_id":null,"html_url":"https://github.com/trinker/discon","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/trinker/discon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trinker%2Fdiscon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trinker%2Fdiscon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trinker%2Fdiscon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trinker%2Fdiscon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trinker","download_url":"https://codeload.github.com/trinker/discon/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trinker%2Fdiscon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28597087,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T02:08:49.799Z","status":"ssl_error","status_checked_at":"2026-01-20T02:08:44.148Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-10T18:27:42.134Z","updated_at":"2026-01-20T06:02:22.191Z","avatar_url":"https://github.com/trinker.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# discon\n\n```{r, echo=FALSE}\ndesc \u003c- suppressWarnings(readLines(\"DESCRIPTION\"))\nregex \u003c- \"(^Version:\\\\s+)(\\\\d+\\\\.\\\\d+\\\\.\\\\d+)\"\nloc \u003c- grep(regex, desc)\nver \u003c- gsub(regex, \"\\\\2\", desc[loc])\nverbad \u003c- sprintf('\u003ca href=\"https://img.shields.io/badge/Version-%s-orange.svg\"\u003e\u003cimg src=\"https://img.shields.io/badge/Version-%s-orange.svg\" alt=\"Version\"/\u003e\u003c/a\u003e\u003c/p\u003e', ver, ver)\n````\n[![Build Status](https://travis-ci.org/trinker/discon.png?branch=master)](https://travis-ci.org/trinker/discon)\n[![Coverage Status](https://coveralls.io/repos/trinker/discon/badge.png)](https://coveralls.io/r/trinker/discon)\n[![DOI](https://zenodo.org/badge/5398/trinker/discon.svg)](http://dx.doi.org/10.5281/zenodo.15711)\n`r verbad`\n\n\n\u003cimg src=\"inst/discon_logo/r_discon.png\" width = \"300\" alt=\"discon logo\"\u003e   \n\n\n[discon](http://trinker.github.com/discon_dev) is a collection of R tools to enhance analysis of  *discourse connectors* in text.  Discourse connectors are cohesive devices that can be used to help identify themes within a text.  This package provides computational means of extracting and visualizing various elements from the text that contain discourse connectors.  This can assist in qualitative analysis of discourse by identifying categories that may aide analysis (using the computer for efficiency and data coverage) towards generating themes.\n\n\u003e Discourse connectors are devices used to bridge between turns (in speech) and sentences, indicating the logical relations among the parts of a the logical relations among the parts of a framework for the listener/reader.  There are two major classes of discourse connectors: discourse markers and linking adverbials. Discourse markers \u0026ndash; forms like *ok*, *well*, and *now* \u0026ndash; are restricted primarily to spoken discourse. These forms have distinct discourse functions, but it is difficult to identify the specific meaning of the word itself. In contrast, linking adverbials \u0026ndash; forms like *however*, *thus*, *therefore*, *for example* (*e.g.*), and *that is* (*i.e.*) \u0026ndash; are found in both spoken and written registers, and they have greater inherent meaning than discourse markers. (Biber, 2006, p. 66)\n\nPlease see the following resources for additional information:\n\n- Alemany, L. A. (2005). [Representing discourse for automatic text summarization via shallow NLP techniques](http://www.cs.famaf.unc.edu.ar/~laura/shallowdisc4summ/tesi_electronica.pdf) (Unpublished doctoral dissertation). Universitat de Barcelona, Barcelona.     \n  - [Web Site](http://russell.famaf.unc.edu.ar/~laura/shallowdisc4summ/discmar)    \n- Biber, D. (2006). *University language: A corpus-based study of spoken and written registers*. Amsterdam: John Benjamins Publishing Company.\n- Halliday, M. A. K. \u0026 Hasan, R. (1976). *Cohesion in English*. English Language Series. London: Longman.\n- Kalajahi, S. A. R., Abdullah, A. N., Mukundan, J., \u0026 Tannacito, D. J. (2012). [Discourse connectors: An overview of the history, definition and classification of the term](http://goo.gl/eS0OwV). *World Applied Sciences Journal, 19*(11), 1659-1673. \n- Linguistic Data Consortium. (2004) [*Simple metadata annotation specification (MDE)*](http://www.itl.nist.gov/iad/mig/tests/rt/2004-fall/docs/SimpleMDE_V6.2-draft.pdf). University of Pennsylvania.  Retrieved from [http://www.itl.nist.gov/iad/mig/tests/rt/2004-fall/docs/SimpleMDE_V6.2-draft.pdf](http://www.itl.nist.gov/iad/mig/tests/rt/2004-fall/docs/SimpleMDE_V6.2-draft.pdf)\n- Ryan, G. W. \u0026 Bernard, H. R. (2003). [Techniques to identify themes](http://goo.gl/KdYxB8). *Field Methods.  15*(1), 85-109. doi:[10.1177/1525822X02239569.](http://fmx.sagepub.com/content/15/1/85)\n- Schiffrin, D. (1987). *Discourse markers*. London: Cambridge University Press.      \n- Schiffrin, D. (2001). [Discourse markers: Language, meaning, and context](http://goo.gl/KbwG9I). In D. Schiffrin, D., D. Tannen, \u0026 H. E. Hamilton, (Eds.) *The handbook of discourse analysis* (pp. 54-75). Malden, MA: Blackwell Publishing.\n- Ward, N. (2000, October). [Issues in the Transcription of English Conversational Grunts](http://www.aclweb.org/anthology/W00-1004). *Proceedings of the 1st SIGdial Workshop on Discourse and Dialogue* (pp. 29\u0026mdash;35). Hong Kong: Association for Computational Linguistics.  Retrieved from [http://www.aclweb.org/anthology/W00-1004](http://www.aclweb.org/anthology/W00-1004)\n\n\n## Installation\n\nTo download the development version of discon:\n\nDownload the [zip ball](https://github.com/trinker/discon/zipball/master) or [tar ball](https://github.com/trinker/discon/tarball/master), decompress and run `R CMD INSTALL` on it, or use the **pacman** package to install the development version:\n\n```r\nif (!require(\"pacman\")) install.packages(\"pacman\")\npacman::p_load_gh(\n    \"trinker/qdapRegex\", \n    \"trinker/qdapTools\", \n    \"trinker/qdapDictionaries\", \n    \"trinker/qdap\",\n    \"trinker/discon\"\n)\n```\n\n## Help\n\n- [Web Page](http://trinker.github.com/discon/)     \n- [Package PDF Help Manual](https://dl.dropboxusercontent.com/u/61803503/discon.pdf)   \n\n## Contact\n\nYou are welcome to:\n* submit suggestions and bug-reports at: \u003chttps://github.com/trinker/discon/issues\u003e\n* send a pull request on: \u003chttps://github.com/trinker/discon/\u003e\n* compose a friendly e-mail to: \u003ctyler.rinker@gmail.com\u003e\n\n## List of Discourse Connector Functions\n\n1. `discourse_connector` \u0026 `discourse_connector_logical`\n2. `dc_backchannel`\n3. `dc_causality` \u0026 `dc_causality_sub`\n4. `dc_comparison`\n5. `dc_connective` \u0026 `dc_connective_sub`\n7. `dc_context` \u0026 `dc_context_sub`\n7. `dc_equality` \u0026 `dc_equality_sub`\n8. `dc_filled_pause`\n9. `dc_negator`\n10. `dc_oh` \u0026 `dc_oh_begin`\n11. `dc_revision`\n12. `dc_timing`\n13. `dc_typology`\n14. `dc_well` \u0026 `dc_well_begin`\n15. `kwic` (Key Words in Context)\n\n\n\n\\****Note*** *that all `discourse_connector` based functions (incuding functions prefixed with `dc_`) have generic `plot` method that utilizes `qdap::dispersion_plot` to generate a lexical dispersion plot.*\n\n## Examples\n\n```{r, echo=FALSE, message=FALSE}\nif (!require(\"pacman\")) install.packages(\"pacman\")\npacman::p_load(discon)\nknitr::opts_chunk$set(fig.path = \"inst/figure/\")\n```\n\n### Specific Discourse Connector/Connector Functions\n\nSpecific discourse connector functions for exploring the context in which such markers are used.  Note these functions are prefixed with a `dc_` (for discourse connector).\n\n\u003ch4 id = \"causality\" \u003eCausality\u003c/h4\u003e\n\n\n```{r, comment=NA, fig.height=7, fig.width=11}\ncausality_1 \u003c- with(pres_debates2012, dc_causality(dialogue, person))\nplot(causality_1)\n```\n\n```{r, comment=NA, fig.height=3, fig.width=4}\nplot(causality_1[[1]], high = \"darkgreen\")\ncausality_1[1]\nhead(causality_1[[2]])\n```\n\n\u003ch4 id = \"causality2\" \u003eCausality: Subgroups\u003c/h4\u003e\n\n```{r, comment=NA, fig.height=7, fig.width=11}\ncausality_2 \u003c- with(pres_debates2012, dc_causality_sub(dialogue, person))\nplot(causality_2, bg.color = \"grey60\", color = \"blue\", \n    total.color = \"grey40\", horiz.color=\"grey20\")\ncausality_2[1]\nhead(causality_2[[2]])\nhead(causality_2[[3]])\n```\n\n\u003ch4 id=\"revision\"\u003eRevision\u003c/h4\u003e\n\n```{r, comment=NA}\nrevision \u003c- with(pres_debates2012[1:20, ], dc_revision(dialogue, person))\nrevision[1]\nrevision[2]\n```\n\n\u003ch4 id=\"typology\"\u003eTypology\u003c/h4\u003e\n\n```{r, comment=NA}\ntypology \u003c- with(pres_debates2012[1:120, ], dc_typology(dialogue, person))\ntypology[1]\ntypology[2]\ntypology[3]\n```\n\n### Generalizable Discourse Connector Function\n\nWe will now examine `discourse_connector`, the basic root function that all of the other `dc_` prefixed functions are based upon.  This can be used by the researcher to find specific *text elements* + *surrounding context*.\n\n```{r, comment=NA}\n## Marker with one type (just: \"I\")\ni_disc \u003c- with(pres_debates2012, discourse_connector(dialogue, person,\n    names = c(\"I\"),\n    regex = \"\\\\bI('[a-z]+)*\\\\b\",\n    terms = list(I = c(\" I \", \" I'\"))\n))\ni_disc[[1]]\nhead(i_disc[[2]])\n## Marker with two types (both: \"I\" \u0026 \"you\")\ni_you_disc \u003c- with(pres_debates2012, discourse_connector(dialogue, person,\n    names = c(\"I\", \"you\"),\n    regex =  list(\n        I = \"I('[a-z]+)*\\\\b\",\n        you = \"(\\\\b[Yy]ou('[a-z]+)*\\\\b)\"\n    ),\n    terms = list(\n        I = c(\" I \", \" I'\"),\n        you = c(\" you \", \" you'\")\n    )\n))\ni_you_disc[[1]]\nhead(i_you_disc[[2]])\nhead(i_you_disc[[3]])\n```\n\n### Key Words in Context\n\n\n```{r, comment=NA, fig.height=6, fig.width=6}\nkeyWords \u003c- with(pres_debates2012, kwic(dialogue, list(time, person)))\nplot(keyWords[[1]], high = \"red\")\n```\n\n```{r, comment=NA, fig.height=18, fig.width=11}\nwith(pres_debates2012, plot(keyWords, grouping.var = person, rm.vars = time, \n    total.color = NULL, bg.color = \"black\", color = \"yellow\", \n    horiz.color=\"grey20\"))\nhead(keyWords[[2]])\n```\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrinker%2Fdiscon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrinker%2Fdiscon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrinker%2Fdiscon/lists"}