Update Romanian example

Change-Id: Ib3bbcb7813605fbf071cf8d5e6caea13767d55c1
diff --git a/common.R b/common.R
index af68bb8..e207647 100644
--- a/common.R
+++ b/common.R
@@ -14,6 +14,24 @@
   v[order(nchar(v), v, decreasing = T)]
 }
 
+po2en <- function(text) {
+  deeplr::translate2(
+    text,
+    target_lang = "EN",
+    source_lang = "PO",
+    auth_key = "87372412-770c-73c5-cdb9-2c6bee43afc4:fx"
+  )
+}
+
+ro2en <- function(text) {
+  deeplr::translate2(
+    text,
+    target_lang = "EN",
+    source_lang = "RO",
+    auth_key = "87372412-770c-73c5-cdb9-2c6bee43afc4:fx"
+  )
+}
+
 highliteSubstrings <- function (string, substrings) {
   what = paste0('(', paste0(substrings, collapse="|"), ')')
   with = '<b>\\1</b>'
@@ -38,11 +56,20 @@
 #    mutate(Example=highliteSubstrings(example, wordsFromQuery(query))) %>%
     mutate(Example=example) %>%
     select(Collocate, Example, logDice, pmi, ll) %>%
-    head(50) %>%
+#    head(50) %>%
     datatable(escape = F, rownames = FALSE) %>%
     formatRound(columns=~logDice + pmi + ll, digits=2)
 }
 
+
+show_simple_table_tr <- function(df, pageLength = 20) {
+  df %>%
+    mutate(Collocate=sprintf('<a href="%s">%s</a>', webUIRequestUrl, collocate)) %>%
+    select(Collocate, en, logDice, pmi, ll) %>%
+    datatable(options = list(pageLength = pageLength), escape = F) %>%
+    formatRound(columns=~logDice + pmi + ll, digits=2)
+}
+
 show_simple_table <- function(df, pageLength = 20) {
   df %>%
     mutate(Collocate=sprintf('<a href="%s">%s</a>', webUIRequestUrl, collocate)) %>%
diff --git a/lvc_identification.Rmd b/lvc_identification.Rmd
index d8d7482..7f4a4c9 100644
--- a/lvc_identification.Rmd
+++ b/lvc_identification.Rmd
@@ -29,13 +29,15 @@
 knitr::opts_chunk$set(dev = 'svg', echo = FALSE, warning = FALSE)
 source("common.R")
 ```
-# Romanian
+# Pilot study: LVC detetction
 
-## CA in CoRoLa for »pune în NN« (= to put in NN)
+Identification of Light Verb Constructions using collocation analysis.
 
-```{r pune_in}
+## Romanian
+
+```{r pune-in, fig.cap='Collocation analysis for »pune în NN« (= to put in NN) in CoRoLa.'}
 pune_in_ca_de = readRDS("pune_in_CA_de.rds")
-pune_in_ca_de %>% show_simple_table(10)
+pune_in_ca_de %>% show_simple_table_tr(10)
 ```
 
 # Hungarian
diff --git a/pune_in_CA_de.rds b/pune_in_CA_de.rds
index 843dcf7..8e8742d 100644
--- a/pune_in_CA_de.rds
+++ b/pune_in_CA_de.rds
Binary files differ