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))
FE5 FE6 FE12 FP1 FP3 FP4 FP5 FP6 FP7 FP8 FP9 FP10 FP11 FP12 FP2

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.

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

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

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

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))
} ))

 **** French Judge  1 - Name:  FE5 
Correspondence analysis summary
Eigenvalues
      Variance % of var. Cumulative % of var. 
dim 1    1.000    30.364               30.364 
dim 2    1.000    30.364               60.729 
dim 3    0.806    24.483               85.212 
dim 4    0.250     7.591               92.803 
dim 5    0.237     7.197              100.000 

Cramer's V  0.686    Inertia  3.293 


 **** French Judge  2 - Name:  FE6 
Correspondence analysis summary
Eigenvalues
      Variance % of var. Cumulative % of var. 
dim 1        1        25                   25 
dim 2        1        25                   50 
dim 3        1        25                   75 
dim 4        1        25                  100 
dim 5        0         0                  100 

Cramer's V  0.756    Inertia  4 


 **** French Judge  3 - Name:  FE12 
Correspondence analysis summary
Eigenvalues
      Variance % of var. Cumulative % of var. 
dim 1    1.000    42.056               42.056 
dim 2    0.754    31.697               73.753 
dim 3    0.624    26.247              100.000 
dim 4    0.000     0.000              100.000 
dim 5    0.000     0.000              100.000 

Cramer's V  0.583    Inertia  2.378 

 **** French Judge  4 - Name:  FP1 
Correspondence analysis summary
Eigenvalues
      Variance % of var. Cumulative % of var. 
dim 1    1.000    43.386               43.386 
dim 2    0.884    38.347               81.733 
dim 3    0.421    18.267              100.000 
dim 4    0.000     0.000              100.000 
dim 5    0.000     0.000              100.000 

Cramer's V  0.574    Inertia  2.305 

 **** French Judge  5 - Name:  FP3 
Correspondence analysis summary
Eigenvalues
      Variance % of var. Cumulative % of var. 
dim 1    1.000    38.961               38.961 
dim 2    1.000    38.961               77.922 
dim 3    0.567    22.078              100.000 
dim 4    0.000     0.000              100.000 
dim 5    0.000     0.000              100.000 

Cramer's V  0.606    Inertia  2.567 


 **** French Judge  6 - Name:  FP4 
Correspondence analysis summary

Eigenvalues
      Variance % of var. Cumulative % of var. 
dim 1    1.000    33.333               33.333 
dim 2    1.000    33.333               66.667 
dim 3    1.000    33.333              100.000 
dim 4    0.000     0.000              100.000 
dim 5    0.000     0.000              100.000 

Cramer's V  0.655    Inertia  3 


 **** French Judge  7 - Name:  FP5 
Correspondence analysis summary

Eigenvalues
      Variance % of var. Cumulative % of var. 
dim 1    0.615    24.348               24.348 
dim 2    0.551    21.813               46.161 
dim 3    0.424    16.801               62.962 
dim 4    0.327    12.939               75.901 
dim 5    0.267    10.570               86.471 

Cramer's V  0.601    Inertia  2.525 


 **** French Judge  8 - Name:  FP6 
Correspondence analysis summary

Eigenvalues
      Variance % of var. Cumulative % of var. 
dim 1    0.604    54.374               54.374 
dim 2    0.215    19.372               73.746 
dim 3    0.146    13.168               86.914 
dim 4    0.089     7.995               94.909 
dim 5    0.028     2.558               97.467 

Cramer's V  0.398    Inertia  1.11 


 **** French Judge  9 - Name:  FP7 
Correspondence analysis summary

Eigenvalues
      Variance % of var. Cumulative % of var. 
dim 1    0.919    23.546               23.546 
dim 2    0.825    21.143               44.689 
dim 3    0.708    18.153               62.842 
dim 4    0.634    16.245               79.087 
dim 5    0.407    10.431               89.518 

Cramer's V  0.747    Inertia  3.903 


 **** French Judge  10 - Name:  FP8 
Correspondence analysis summary

Eigenvalues
      Variance % of var. Cumulative % of var. 
dim 1    0.760    27.724               27.724 
dim 2    0.581    21.197               48.921 
dim 3    0.422    15.387               64.308 
dim 4    0.364    13.272               77.580 
dim 5    0.265     9.659               87.239 

Cramer's V  0.626    Inertia  2.74 


 **** French Judge  11 - Name:  FP9 
Correspondence analysis summary

Eigenvalues
      Variance % of var. Cumulative % of var. 
dim 1    0.863    52.025               52.025 
dim 2    0.714    43.027               95.052 
dim 3    0.082     4.948              100.000 
dim 4    0.000     0.000              100.000 
dim 5    0.000     0.000              100.000 

Cramer's V  0.487    Inertia  1.66 


 **** French Judge  12 - Name:  FP10 
Correspondence analysis summary

Eigenvalues
      Variance % of var. Cumulative % of var. 
dim 1    0.842    43.164               43.164 
dim 2    0.627    32.176               75.340 
dim 3    0.481    24.660              100.000 
dim 4    0.000     0.000              100.000 
dim 5    0.000     0.000              100.000 

Cramer's V  0.528    Inertia  1.95 


 **** French Judge  13 - Name:  FP11 
Correspondence analysis summary

Eigenvalues
      Variance % of var. Cumulative % of var. 
dim 1    0.780    23.629               23.629 
dim 2    0.677    20.504               44.133 
dim 3    0.547    16.560               60.693 
dim 4    0.511    15.478               76.171 
dim 5    0.459    13.887               90.058 

Cramer's V  0.687    Inertia  3.303 


 **** French Judge  14 - Name:  FP12 
Correspondence analysis summary

Eigenvalues
      Variance % of var. Cumulative % of var. 
dim 1    1.000    39.604               39.604 
dim 2    0.917    36.321               75.925 
dim 3    0.608    24.075              100.000 
dim 4    0.000     0.000              100.000 
dim 5    0.000     0.000              100.000 

Cramer's V  0.601    Inertia  2.525 


 **** French Judge  15 - Name:  FP2 
Correspondence analysis summary

Eigenvalues
      Variance % of var. Cumulative % of var. 
dim 1        1        50                   50 
dim 2        1        50                  100 
dim 3        0         0                  100 
dim 4        0         0                  100 
dim 5        0         0                  100 

Cramer's V  0.632    Inertia  2 

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)))
8

 

Catalan panel

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

cat(names(baseCat))
CE1 CE2 CE3 CE4 CE7 CE8 CE9 CE10 CE11

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))
} ))
 **** Catalan Judge  1 - Name:  CE1 
Correspondence analysis summary
Eigenvalues
      Variance % of var. Cumulative % of var. 
dim 1    1.000    40.000               40.000 
dim 2    0.767    30.667               70.667 
dim 3    0.733    29.333              100.000 
dim 4    0.000     0.000              100.000 
dim 5    0.000     0.000              100.000 

Cramer's V  0.598    Inertia  2.5 


 **** Catalan Judge  2 - Name:  CE2 
Correspondence analysis summary
Eigenvalues
      Variance % of var. Cumulative % of var. 
dim 1    1.000    33.333               33.333 
dim 2    1.000    33.333               66.667 
dim 3    1.000    33.333              100.000 
dim 4    0.000     0.000              100.000 
dim 5    0.000     0.000              100.000 

Cramer's V  0.655    Inertia  3 


 **** Catalan Judge  3 - Name:  CE3 
Correspondence analysis summary
Eigenvalues
      Variance % of var. Cumulative % of var. 
dim 1    1.000    37.500               37.500 
dim 2    1.000    37.500               75.000 
dim 3    0.667    25.000              100.000 
dim 4    0.000     0.000              100.000 
dim 5    0.000     0.000              100.000 

Cramer's V  0.617    Inertia  2.667 


 **** Catalan Judge  4 - Name:  CE4 
Correspondence analysis summary
Eigenvalues
      Variance % of var. Cumulative % of var. 
dim 1    0.897    52.677               52.677 
dim 2    0.667    39.158               91.835 
dim 3    0.139     8.165              100.000 
dim 4    0.000     0.000              100.000 
dim 5    0.000     0.000              100.000 

Cramer's V  0.493    Inertia  1.702 


 **** Catalan Judge  5 - Name:  CE7 
Correspondence analysis summary
Eigenvalues
      Variance % of var. Cumulative % of var. 
dim 1    1.000    28.504               28.504 
dim 2    1.000    28.504               57.007 
dim 3    0.856    24.408               81.415 
dim 4    0.652    18.585              100.000 
dim 5    0.000     0.000              100.000 

Cramer's V  0.708    Inertia  3.508 


 **** Catalan Judge  6 - Name:  CE8 
Correspondence analysis summary
Eigenvalues
      Variance % of var. Cumulative % of var. 
dim 1    0.838    38.560               38.560 
dim 2    0.750    34.497               73.057 
dim 3    0.586    26.943              100.000 
dim 4    0.000     0.000              100.000 
dim 5    0.000     0.000              100.000 

Cramer's V  0.557    Inertia  2.174 


 **** Catalan Judge  7 - Name:  CE9 
Correspondence analysis summary
Eigenvalues
      Variance % of var. Cumulative % of var. 
dim 1    0.719    38.011               38.011 
dim 2    0.622    32.883               70.894 
dim 3    0.396    20.933               91.827 
dim 4    0.155     8.173              100.000 
dim 5    0.000     0.000              100.000 

Cramer's V  0.52    Inertia  1.893 


 **** Catalan Judge  8 - Name:  CE10 
Correspondence analysis summary
Eigenvalues
      Variance % of var. Cumulative % of var. 
dim 1    1.000    33.333               33.333 
dim 2    1.000    33.333               66.667 
dim 3    1.000    33.333              100.000 
dim 4    0.000     0.000              100.000 
dim 5    0.000     0.000              100.000 

Cramer's V  0.655    Inertia  3 


 **** Catalan Judge  9 - Name:  CE11 
Correspondence analysis summary
Eigenvalues
      Variance % of var. Cumulative % of var. 
dim 1    1.000    38.298               38.298 
dim 2    1.000    38.298               76.596 
dim 3    0.611    23.404              100.000 
dim 4    0.000     0.000              100.000 
dim 5    0.000     0.000              100.000 

Cramer's V  0.611    Inertia  2.611 

 

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)))
6