Skip to content

Commit

Permalink
Rebuild with PNG
Browse files Browse the repository at this point in the history
  • Loading branch information
koheiw committed Jul 16, 2018
1 parent 9755c23 commit a46c4d9
Show file tree
Hide file tree
Showing 64 changed files with 49 additions and 69,053 deletions.
4 changes: 0 additions & 4 deletions _output.yml

This file was deleted.

2 changes: 1 addition & 1 deletion content/_index.en.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ You can not only see the R commands but execute them yourself if you [download t
Contributions in the form of feedback, comments, code, and bug reports are most welcome. If you have questions on how to use **quanteda**, please post them to [the quanteda channel on StackOverflow](https://stackoverflow.com/questions/tagged/quanteda). If you find a bug, please report it to the [quanteda issues](https://github.com/quanteda/quanteda/issues). *We prefer these platforms to emails in communicating with our users* because the records will help other users who have similar problems.

{{% notice info %}}
Examples in this tutorial are written for **quanteda** version 1.3.0. Please check if you have the same version installed by a command `packageVersion('quanteda')`.
Examples in this tutorial are written for **quanteda** version 1.3.4. Please check if you have the same version installed by a command `packageVersion('quanteda')`.
{{% /notice %}}
4 changes: 0 additions & 4 deletions content/advanced-operations/_output.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ axis(1, seq_len(ndoc(eu_lsd_dfm)), ymd("2016-01-01") + weeks(seq_len(ndoc(eu_lsd
legend('topleft', col = 1:2, legend = c('Negative', 'Positive'), lty = 1, bg = 'white')
```

<img src="/advanced-operations/targeted-dictionary-analysis_files/figure-html/unnamed-chunk-6-1.svg" width="768" />
<img src="/advanced-operations/targeted-dictionary-analysis_files/figure-html/unnamed-chunk-6-1.png" width="672" />


```r
Expand All @@ -105,7 +105,7 @@ grid()
abline(h = 0, lty = 2)
```

<img src="/advanced-operations/targeted-dictionary-analysis_files/figure-html/unnamed-chunk-7-1.svg" width="768" />
<img src="/advanced-operations/targeted-dictionary-analysis_files/figure-html/unnamed-chunk-7-1.png" width="672" />

### Immigration

Expand All @@ -122,7 +122,7 @@ axis(1, seq_len(ndoc(immig_lsd_dfm)), ymd("2016-01-01") + weeks(seq_len(ndoc(imm
legend('topleft', col = 1:2, legend = c('Negative', 'Positive'), lty = 1, bg = 'white')
```

<img src="/advanced-operations/targeted-dictionary-analysis_files/figure-html/unnamed-chunk-8-1.svg" width="768" />
<img src="/advanced-operations/targeted-dictionary-analysis_files/figure-html/unnamed-chunk-8-1.png" width="672" />


```r
Expand All @@ -134,5 +134,5 @@ grid()
abline(h = 0, lty = 2)
```

<img src="/advanced-operations/targeted-dictionary-analysis_files/figure-html/unnamed-chunk-9-1.svg" width="768" />
<img src="/advanced-operations/targeted-dictionary-analysis_files/figure-html/unnamed-chunk-9-1.png" width="672" />

Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,5 @@ user_clust <- hclust(user_dist)
plot(user_clust, labels = FALSE)
```

<img src="/advanced-operations/twitter-user-similarity_files/figure-html/unnamed-chunk-8-1.svg" width="768" />
<img src="/advanced-operations/twitter-user-similarity_files/figure-html/unnamed-chunk-8-1.png" width="672" />

4 changes: 0 additions & 4 deletions content/basic-operations/_output.yml

This file was deleted.

4 changes: 0 additions & 4 deletions content/basic-operations/corpus/_output.yml

This file was deleted.

6 changes: 3 additions & 3 deletions content/basic-operations/corpus/corpus.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ summary(immig_corp)
## UKIP 346 723 27 UKIP
##
## Source: /home/kohei/packages/quanteda_tutorials/content/basic-operations/corpus/* on x86_64 by kohei
## Created: Wed Jun 20 09:27:26 2018
## Created: Mon Jul 16 22:49:26 2018
## Notes:
```

Expand Down Expand Up @@ -86,7 +86,7 @@ summary(inaug_corp, 5)
## inaugCorpus.csv.5 804 2381 45 1805 Jefferson Thomas
##
## Source: /home/kohei/packages/quanteda_tutorials/content/basic-operations/corpus/* on x86_64 by kohei
## Created: Wed Jun 20 09:27:27 2018
## Created: Mon Jul 16 22:49:26 2018
## Notes:
```

Expand All @@ -112,7 +112,7 @@ summary(inaug_corp, 5)
## 1805 Thomas Jefferson 804 2381 45 1805 Jefferson Thomas
##
## Source: /home/kohei/packages/quanteda_tutorials/content/basic-operations/corpus/* on x86_64 by kohei
## Created: Wed Jun 20 09:27:27 2018
## Created: Mon Jul 16 22:49:26 2018
## Notes:
```

Expand Down
4 changes: 0 additions & 4 deletions content/basic-operations/dfm/_output.yml

This file was deleted.

4 changes: 0 additions & 4 deletions content/basic-operations/fcm/_output.yml

This file was deleted.

2 changes: 1 addition & 1 deletion content/basic-operations/fcm/fcm.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,5 @@ size <- log(colSums(dfm_select(news_dfm, feat)))
textplot_network(news_fcm, min_freq = 0.8, vertex_size = size / max(size) * 3)
```

<img src="/basic-operations/fcm/fcm_files/figure-html/unnamed-chunk-7-1.svg" width="768" />
<img src="/basic-operations/fcm/fcm_files/figure-html/unnamed-chunk-7-1.png" width="672" />

4 changes: 0 additions & 4 deletions content/basic-operations/tokens/_output.yml

This file was deleted.

4 changes: 0 additions & 4 deletions content/import-data/_output.yml

This file was deleted.

4 changes: 0 additions & 4 deletions content/introduction/_output.yml

This file was deleted.

4 changes: 0 additions & 4 deletions content/language-specific/_output.yml

This file was deleted.

61 changes: 0 additions & 61 deletions content/language-specific/korean.Rmarkdown

This file was deleted.

99 changes: 0 additions & 99 deletions content/language-specific/korean.markdown

This file was deleted.

4 changes: 0 additions & 4 deletions content/machine-learning/_output.yml

This file was deleted.

4 changes: 2 additions & 2 deletions content/machine-learning/ca.en.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ca <- dfm(corp, remove_punct = TRUE, remove = stopwords('en')) %>% textmodel_ca(
textplot_scale1d(ca)
```

<img src="/machine-learning/ca.en_files/figure-html/unnamed-chunk-3-1.svg" width="768" />
<img src="/machine-learning/ca.en_files/figure-html/unnamed-chunk-3-1.png" width="672" />

If you want to plot documents on multi-dimensional scale, you use `coef()` to obtain coordinates of lower dimensions.

Expand All @@ -56,5 +56,5 @@ grid()
text(ca_data$dim1, ca_data$dim2, labels = rownames(ca_data), cex = 0.8, col = rgb(0, 0, 0, 0.7))
```

<img src="/machine-learning/ca.en_files/figure-html/unnamed-chunk-4-1.svg" width="672" />
<img src="/machine-learning/ca.en_files/figure-html/unnamed-chunk-4-1.png" width="672" />

52 changes: 26 additions & 26 deletions content/machine-learning/topicmodel.en.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -61,28 +61,28 @@ terms(lda, 10)
```

```
## Topic 1 Topic 2 Topic 3 Topic 4 Topic 5
## [1,] "obama" "oil" "violence" "doctors" "corbyn"
## [2,] "shooting" "markets" "australian" "nhs" "apple"
## [3,] "black" "labor" "australia" "hospital" "game"
## [4,] "china" "sales" "officers" "drug" "google"
## [5,] "church" "prices" "sexual" "medical" "leadership"
## [6,] "shot" "climate" "prison" "junior" "jeremy"
## [7,] "fbi" "turnbull" "abuse" "drugs" "shadow"
## [8,] "chinese" "banks" "cases" "patients" "users"
## [9,] "nuclear" "energy" "criminal" "contract" "games"
## [10,] "america" "investors" "trial" "steel" "technology"
## Topic 6 Topic 7 Topic 8 Topic 9 Topic 10
## [1,] "clinton" "refugees" "water" "brussels" "budget"
## [2,] "sanders" "syria" "parties" "johnson" "funding"
## [3,] "cruz" "isis" "residents" "talks" "food"
## [4,] "hillary" "syrian" "parents" "boris" "housing"
## [5,] "trump's" "un" "votes" "19" "income"
## [6,] "bernie" "turkey" "voting" "benefits" "education"
## [7,] "senator" "islamic" "baby" "french" "cuts"
## [8,] "ted" "aid" "homes" "summit" "spending"
## [9,] "rubio" "khan" "town" "cabinet" "development"
## [10,] "obama" "forces" "air" "negotiations" "osborne"
## Topic 1 Topic 2 Topic 3 Topic 4 Topic 5
## [1,] "violence" "australia" "climate" "oil" "apple"
## [2,] "senate" "australian" "energy" "markets" "game"
## [3,] "education" "funding" "water" "sales" "users"
## [4,] "girls" "development" "housing" "prices" "google"
## [5,] "schools" "food" "gas" "shares" "facebook"
## [6,] "labor" "businesses" "homes" "investors" "hospital"
## [7,] "gun" "aid" "khan" "trading" "games"
## [8,] "marriage" "offshore" "average" "banks" "phone"
## [9,] "laws" "fund" "emissions" "rates" "music"
## [10,] "australia" "sector" "property" "quarter" "chinese"
## Topic 6 Topic 7 Topic 8 Topic 9 Topic 10
## [1,] "turnbull" "officers" "corbyn" "clinton" "syria"
## [2,] "budget" "prison" "refugees" "sanders" "isis"
## [3,] "brussels" "drug" "johnson" "cruz" "military"
## [4,] "19" "sexual" "jeremy" "hillary" "syrian"
## [5,] "labor" "abuse" "doctors" "obama" "islamic"
## [6,] "benefits" "child" "boris" "trump's" "forces"
## [7,] "talks" "drugs" "leadership" "bernie" "un"
## [8,] "summit" "cases" "tory" "ted" "russian"
## [9,] "photograph" "criminal" "shadow" "rubio" "muslim"
## [10,] "english" "trial" "junior" "senator" "peace"
```

You can then obtain the most likely topics using `topics()` and save them as a document-level variable.
Expand All @@ -95,13 +95,13 @@ head(topics(lda), 20)

```
## text136751 text136585 text139163 text169133 text153451 text163885
## 3 8 5 1 3 5
## 3 8 2 10 7 3
## text157885 text173244 text137394 text169408 text184646 text127410
## 6 7 8 8 9 1
## 9 3 1 5 8 7
## text134923 text169695 text147917 text157535 text177078 text174393
## 9 2 5 2 10 6
## 8 4 5 3 3 9
## text181782 text143323
## 8 10
## 5 8
```

{{% notice info %}}
Expand Down
2 changes: 1 addition & 1 deletion content/machine-learning/wordfish.en.Rmarkdown
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ textplot_scale1d(wf, doclabels = doclab, groups = docvars(irish_dfm, "party"))

Finally, we can plot the estimated word positions and highlight certain features.

```{r}
```{r, dev="png"}
textplot_scale1d(wf, margin = "features",
highlighted = c("government", "global", "children",
"bank", "economy", "the", "citizenship",
Expand Down
Loading

0 comments on commit a46c4d9

Please sign in to comment.