Skip to content

Commit

Permalink
test protocol update
Browse files Browse the repository at this point in the history
  • Loading branch information
ezufall committed Nov 8, 2024
1 parent 472aaf8 commit 5ed73e9
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions vignettes/test_procedures.Rmd
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: "Testing Protocol Companion to textNet Vignette"
authors:
author:
- name: Elise Zufall
- name: Tyler Scott
date: 23 October 2024
date: 7 November 2024
output: pdf_document
---

Expand All @@ -14,18 +14,18 @@ knitr::opts_chunk$set(echo = TRUE)

### Pre-Processing Step I: Process PDFs

```{r pdf_clean}
```{r pdf_clean, message=F, warning=F}
library(textNet)
library(stringr)
library(testthat)
URL <- "https://sgma.water.ca.gov/portal/service/gspdocument/download/2840"
download.file(URL, destfile = "vignettes/old.pdf", method="curl")
download.file(URL, destfile = "old.pdf", method="curl")
URL <- "https://sgma.water.ca.gov/portal/service/gspdocument/download/9625"
download.file(URL, destfile = "vignettes/new.pdf", method="curl")
download.file(URL, destfile = "new.pdf", method="curl")
pdfs <- c("vignettes/old.pdf",
"vignettes/new.pdf")
pdfs <- c("old.pdf",
"new.pdf")
old_new_text <- textNet::pdf_clean(pdfs, ocr=F, maxchar=10000,
export_paths=NULL, return_to_memory=T, suppressWarn = F,
Expand All @@ -39,7 +39,7 @@ knitr::opts_chunk$set(echo = TRUE)
### Pre-Processing Step II: Parse Text


```{r parse}
```{r parse, message=F, warning=F}
library(findpython)
ret_path <- find_python_cmd(required_modules = c('spacy', 'en_core_web_lg'))
Expand Down Expand Up @@ -204,7 +204,7 @@ tofrom <- data.table::data.table(
```


```{r plot}
```{r plot, message=F, warning=F}
library(ggraph)
old_extract_plot <- export_to_network(old_extract_clean, "igraph", keep_isolates = F,
collapse_edges = T, self_loops = T)[[1]]
Expand Down

0 comments on commit 5ed73e9

Please sign in to comment.