Script Use of Lexicometry in Sensometrics

4.2. Coding details

From the comments, the same number of individual LTs are built as there are judges.
This codification preserves the information given by each judge on the wines.
Each table has as many columns as different words, called individual words, used in the corresponding individual comments.

Individual words can be homologous from one judge to another, and then correspond to the same global word.
The individual LTs describe the individual wine configurations as provided separately by each judge,
visualized by successive CAs applied to these individual LTs taken one by one.

4.2.1. Building individual LTs. In list format

French panel

Building the separate LT for French judges

The individual LTs describe the individual wine configurations as provided separately by each judge, visualized by successive CAs applied to these individual LTs taken one by one.

The 15 French judges are:

cat(names(baseFr))

The 15 TextData analyses for the French judges are then performed by removing the French stopwords and saving them in a list. The same process could have been done using a loop.

To do the 15 Correspondence analysis of the “individual tables”:

To print the results of the eigenvalues for each of the 15 French judges:

unlist(lapply(1:length(res.TD.Fr.list), function(i) {
cat("\n\n", "**** French Judge ", i, "- Name: ", colnames(baseFr)[i], "\n" )
cat(summary(res.LexCA.Fr.list[[i]],nword=0,ndoc=0,nsup=0))
} ))

To count the number of French judges for whom the first factorial plane explains more than 70% in order to obtain some information on the inertias of the individual tables.

cat(sum(sapply(1:length(res.TD.Fr.list), function(x) res.LexCA.Fr.list[[x]]$eig[2,3]>70)))

 

Catalan panel

Building the separate LT for Catalan judges The 9 Catalan judges are names(baseCat)

cat(names(baseCat))

The 9 TextData analyses for the Catalan judges are then performed by removing the Catalan stopwords and saving them in a list. The same process could have been done using a loop.

res.TD.Cat.list <- lapply(1:ncol(baseCat), function(i) TextData(baseCat,var.text=i, Fmin=1, stop.word.user = str.Cat.stopworduser))
names(res.TD.Cat.list) <- names(baseCat)

 

To do the 9 Correspondence analysis of the "individual tables":

res.LexCA.Cat.list <- lapply(1:length(res.TD.Cat.list), function(i) LexCA(res.TD.Cat.list[[i]], graph=FALSE))
names(res.LexCA.Cat.list) <- names(baseCat)

 

To print the results of the eigenvalues for each of the 9 Catalan judges:

unlist(lapply(1:length(res.TD.Cat.list), function(i) {
cat("\n\n", "**** Catalan Judge ", i, "- Name: ", colnames(baseCat)[i], "\n" )
cat(summary(res.LexCA.Cat.list[[i]],nword=0,ndoc=0,nsup=0))
} ))

 

To count the number of Catalan judges for whom the first factorial plane explains more than 70% in order to obtain some information on the inertias of the individual tables:

cat(sum(sapply(1:length(res.TD.Cat.list), function(x) res.LexCA.Cat.list[[x]]$eig[2,3]>70)))