-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathconnector-sets-revised.lyx
15532 lines (12096 loc) · 334 KB
/
connector-sets-revised.lyx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#LyX 2.2 created this file. For more info see http://www.lyx.org/
\lyxformat 508
\begin_document
\begin_header
\save_transient_properties true
\origin unavailable
\textclass article
\begin_preamble
\usepackage{url}
\usepackage{newunicodechar}
\newunicodechar{」}{~}
\newunicodechar{‐}{-}
\end_preamble
\use_default_options false
\begin_modules
theorems-ams
eqs-within-sections
figs-within-sections
\end_modules
\maintain_unincluded_children false
\language english
\language_package default
\inputencoding utf8
\fontencoding global
\font_roman "times" "default"
\font_sans "helvet" "default"
\font_typewriter "courier" "default"
\font_math "auto" "auto"
\font_default_family default
\use_non_tex_fonts false
\font_sc false
\font_osf false
\font_sf_scale 100 100
\font_tt_scale 100 100
\graphics default
\default_output_format default
\output_sync 0
\bibtex_command default
\index_command default
\paperfontsize default
\spacing single
\use_hyperref true
\pdf_bookmarks true
\pdf_bookmarksnumbered false
\pdf_bookmarksopen false
\pdf_bookmarksopenlevel 1
\pdf_breaklinks true
\pdf_pdfborder true
\pdf_colorlinks true
\pdf_backref false
\pdf_pdfusetitle true
\papersize default
\use_geometry true
\use_package amsmath 2
\use_package amssymb 2
\use_package cancel 1
\use_package esint 0
\use_package mathdots 1
\use_package mathtools 1
\use_package mhchem 0
\use_package stackrel 1
\use_package stmaryrd 1
\use_package undertilde 1
\cite_engine basic
\cite_engine_type default
\biblio_style plain
\use_bibtopic false
\use_indices false
\paperorientation portrait
\suppress_date false
\justification true
\use_refstyle 0
\index Index
\shortcut idx
\color #008000
\end_index
\secnumdepth 2
\tocdepth 2
\paragraph_separation indent
\paragraph_indentation default
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\html_math_output 0
\html_css_as_file 0
\html_be_strict false
\end_header
\begin_body
\begin_layout Title
Connector Set Distributions
\end_layout
\begin_layout Author
Linas Vepstas
\end_layout
\begin_layout Date
\begin_inset Box Frameless
position "t"
hor_pos "c"
has_inner_box 1
inner_pos "t"
use_parbox 0
use_makebox 0
width "50col%"
special "none"
height "1in"
height_special "totalheight"
thickness "0.4pt"
separation "3pt"
shadowsize "4pt"
framecolor "black"
backgroundcolor "none"
status open
\begin_layout Plain Layout
Version 1:
\begin_inset space \hfill{}
\end_inset
11 May 2017
\begin_inset Newline newline
\end_inset
Version 2:
\begin_inset space \hfill{}
\end_inset
6 August 2017
\begin_inset Newline newline
\end_inset
Version 3:
\begin_inset space \hfill{}
\end_inset
12 September 2017
\begin_inset Newline newline
\end_inset
Version 4:
\begin_inset space \hfill{}
\end_inset
23 July 2018
\end_layout
\end_inset
\end_layout
\begin_layout Abstract
The goal of unsupervised learning of the grammar of natural language is
to obtain, by automated means, a valid lexis of dependencies between words.
In the Link Grammar formalism, these dependencies are represented as
\begin_inset Quotes eld
\end_inset
connector sets
\begin_inset Quotes erd
\end_inset
(also termed
\begin_inset Quotes eld
\end_inset
disjuncts
\begin_inset Quotes erd
\end_inset
) that capture how a word connects to it's neighbors.
\end_layout
\begin_layout Abstract
One well-known model of statistical dependency parsing is the so-called
MST-parse model of Deniz Yuret.
It provides reasonable but imperfect results, and has several unsatisfying
properties: it fails to labelled links and it fails to assign words to
grammatical classes.
Both of these limitations can be overcome by extracting connector sets
from MST linkages, and then performing a statistical averaging over many
observations.
Arguments for why this might be a good approach to statistical language
learning is given in a companion report; this report reports on experimental
results.
\end_layout
\begin_layout Abstract
A collection of connector sets (disjuncts) and disjunct vectors are obtained
from a large statistical sampling of MST-parsed sentences.
This report surveys the general statistical landscape of these structures.
The ultimate aim is to use such collections as input data to graph algorithms
that can extract grammatical classes, perform word-sense disambiguation,
obtain synonym-sets and provide accurate dependency parsing.
\end_layout
\begin_layout Abstract
This is a revised version of earlier reports.
It provides a better overview, and provides additional results.
This is not yet the final version; I'm still waiting for additional computation
s to complete.
\end_layout
\begin_layout Section
Introduction
\end_layout
\begin_layout Standard
This report characterizes the statistical distribution of word-disjunct
pairs extracted from a large block of text, using unsupervised natural
language learning techniques.
\end_layout
\begin_layout Standard
A disjunct is a sequence of words, resembling an N-gram, but containing
grammatical information.
The grammatical information in a disjunct is
\begin_inset Quotes eld
\end_inset
complete
\begin_inset Quotes erd
\end_inset
, in the sense that it is sufficient to construct and accurate parser of
language.
This is unlike the situation encountered with Word2Vec
\begin_inset CommandInset citation
LatexCommand cite
key "Mikolov2013a"
\end_inset
or AdaGram
\begin_inset CommandInset citation
LatexCommand cite
key "Bartunov2015"
\end_inset
, where one can discover
\begin_inset Quotes eld
\end_inset
important
\begin_inset Quotes erd
\end_inset
sequences of words, but where the route to the creation of a grammar is
less clear.
The algorithm used to extract disjuncts is also completely different from
the neural-net techniques; it is a graph technique, as opposed to a gradient-de
scent technique.
Despite this, there are exploitable conceptual similarities in building
models of natural language.
\begin_inset CommandInset citation
LatexCommand cite
key "Vepstas2018skippy"
\end_inset
The goal of this report is to provide a fairly detailed statistical analysis
of the distribution of disjuncts, thereby characterizing the structure
of natural language at a grammatical, syntactic level.
\end_layout
\begin_layout Standard
The need for this report is to characterize the structure of the disjunct
dataset to a sufficient degree that it can be used as input to other graph-base
d methods to extract grammatical classes and to perform word-sense disambiguatio
n.
These techniques and algorithms are presented in
\begin_inset CommandInset citation
LatexCommand cite
key "Vepstas2018skippy"
\end_inset
.
\end_layout
\begin_layout Standard
The origin of the concept of a
\begin_inset Quotes eld
\end_inset
disjunct
\begin_inset Quotes erd
\end_inset
comes from the Link Grammar theory of semantic-syntactic parsing.
\begin_inset CommandInset citation
LatexCommand cite
key "Sleator1991,Sleator1993"
\end_inset
.
Link Grammar is a form of dependency grammar; it is essentially equivalent
to other forms of dependency grammar, in that Link Grammar dependencies
can be algorithmically converted into other kinds of dependencies, as well
as into phrase-structure grammars.
In Link Grammar, a disjunct is defined as an ordered sequence of connectors;
those connectors indicate how a word can attach or connect to other words,
forming links.
A reasonable conceptual model for a disjunct is to think of it as a jigsaw-puzz
le piece; the connectors correspond to the tabs and slots on the jigsaw-puzzle
piece.
Parsing a sentence then consists of assembling jigsaw pieces together,
in such a way that there are no unconnected tabs or slots at the end of
the process.
The links between words then indicate the syntactic and semantic relationships
between them.
\end_layout
\begin_layout Standard
A similar relationship between words can be obtained by performing a maximum-spa
nning-tree (MST) parse, where links between words are the ones that maximize
the mutual information between the word-pairs.
\begin_inset CommandInset citation
LatexCommand cite
key "Yuret1998"
\end_inset
The MST approach to natural language grammar has been well-explored, and
provides a reasonable accurate model.
The primary issue is that, when interpreted naively, it does not provide
any labels that describe the relationships between words, such as
\begin_inset Quotes eld
\end_inset
subject
\begin_inset Quotes erd
\end_inset
or
\begin_inset Quotes eld
\end_inset
object
\begin_inset Quotes erd
\end_inset
relationships, which are considered to be key to the symbolic, linguistic
grammatical structure of a language.
\end_layout
\begin_layout Standard
A bridge can be built between the the unlabeled MST representation of a
parsed sentence, and the labeled Link Grammar parse of a sentence.
\begin_inset CommandInset citation
LatexCommand cite
key "Goertzel2014"
\end_inset
This is done by starting with an unlabeled MST parse of a sentence, and
then applying a label to each link, that label consisting of the word-pair,
itself.
In effect, one obtains a jigsaw-puzzle piece, where each tab and slot is
labeled by the word that the tab/slot is allowed to connect to.
After accumulating a large database of statistics on such jigsaw-puzzle
pieces, one can compare them, looking for similarity.
By clustering together similar pieces, one is effectively creating a dictionary
or lexis of grammatical categories (parts of speech) together with the
grammatical information as to how these can be assembled into grammatically
correct, semantically meaningful sentences.
\end_layout
\begin_layout Standard
This approach appears to be sufficient to distinguish between different
meanings associated with a word.
\begin_inset CommandInset citation
LatexCommand cite
key "Vepstas2018stiching"
\end_inset
The final outcome is not dissimilar to popular neural-net techniques, although
the path taken is entirely different.
\begin_inset CommandInset citation
LatexCommand cite
key "Vepstas2018skippy"
\end_inset
The overall approach of discerning graph structure from large bodies of
statistical data is hypothesized to be generalizable to domains far outside
of linguistics, including genomics and proteomics.
\begin_inset CommandInset citation
LatexCommand cite
key "Vepstas2017sheaves"
\end_inset
\end_layout
\begin_layout Standard
This report examines one specific dataset of word-disjunct pairs.
It explores the overall distribution of words and disjuncts, which are
unsurprisingly Zipfian in nature.
It explores various different measures of similarity between words, such
as cosine distance and entropic distance, either of which are employable
for discerning the grammatical classes into which the word-disjunct pairs
can be assigned.
In effect, this provides the background needed for understanding how words
are assigned to grammatical categories, in practice.
It characterizes the nature and structure of natural language, when viewed
from the path of disjuncts derived from MST parses derived from the mutual
information (MI) distribution of word pairs.
The analysis is similar in spirit to an earlier analysis of the statistics
of word-pairs.
\begin_inset CommandInset citation
LatexCommand cite
key "Vepstas2009"
\end_inset
\end_layout
\begin_layout Subsection
Recap
\end_layout
\begin_layout Standard
A detailed description of the process of obtaining (pseudo-)disjuncts from
large unannotated text corpora is given elsewhere.
This section provides a short, informal summary.
\end_layout
\begin_layout Standard
The story so far: Starting from a large text corpus, the mutual information
(MI) of word-pairs are counted.
This MI is used to perform a maximum spanning-tree (MST) parse (of a different
subset of) the corpus.
From each parse, a pseudo-disjunct is extracted for each word.
The pseudo-disjunct is like a real LG disjunct, except that each connector
in the disjunct is the word at the far end of the link.
\end_layout
\begin_layout Standard
So, for example, in in idealized world, the MST parse of the sentence "Ben
ate pizza" would produce the parse Ben <–> ate <–> pizza and from this,
we can extract the pseudo-disjunct (Ben- pizza+) on the word "ate".
Similarly, the sentence "Ben puked pizza" should produce the disjunct (Ben-
pizza+) on the word "puked".
Since these two disjuncts are the same, we can conclude that the two words
"ate" and "puked" are very similar to each other.
Considering all of the other disjuncts that arise in this example, we can
conclude that these are the only two words that are similar.
\end_layout
\begin_layout Standard
Any given word will have many pseudo-disjuncts attached to it.
Each disjunct has a count of the number of times it has been observed.
Thus, this set of disjuncts can be imagined to be a vector in a high-dimensiona
l vector space, which each disjunct being a single basis element.
The similarity of two words can be taken to be the cosine-similarity between
the disjunct-vectors.
Other similarities are possible, and it seems that the entropic similarity,
described below, is superior.
\end_layout
\begin_layout Standard
Equivalently, the set of disjuncts can be thought of as a weighted set:
each disjunct has a weight, corresponding to the number of times it has
been observed.
A weighted set is more or less the same thing as a vector, and these two
are treated as the same, in what follows.
Note that the disjunct vectors are sparse: for any given word, almost all
coefficients will have a count of zero.
For example, the dataset that will be examined next has over a quarter
of a million different pseudo-disjuncts in it; most words have fewer than
a hundred disjuncts on them.
\end_layout
\begin_layout Subsection
Summary of results
\end_layout
\begin_layout Standard
The primary results reported below are these:
\end_layout
\begin_layout Standard
* Most scores and metrics that can be assigned to connector sets give a
(scale-free) Zipfian ranking distribution, and are thus fairly boring.
There are some oddities here and there.
\end_layout
\begin_layout Standard
* The greater the average number of observations per disjunct, the more
grammatically acceptable (accurate) the disjunct seems to be.
This is good news: it means that the general technique is not generating
ungrammatical garbage.
\end_layout
\begin_layout Standard
* Connector sets can be given a mutual information score.
The distribution for the MI scores appears to be Gaussian (
\emph on
i.e
\emph default
.
a Bell curve).
This comes as a bit of a surprise.
I am not aware of what kind of network theory gives a natural rise to Gaussians.
\end_layout
\begin_layout Standard
* The MI score seems to be quite good at identifying words that participate
in idioms, set phrases and institutional phrases.
\end_layout
\begin_layout Standard
* The average number of connectors per disjunct, which should have indicated
the part-of-speech that the word belongs to, fails to do this.
This seems to be due to the fact that the dataset is polluted with lists
and tables (including tables-of-contents, and indexes), all of which are
mis-interpreted as sentences by the processing software.
This causes some very unusual disjuncts to be constructed.
\end_layout
\begin_layout Standard
* In the earlier sample, derived from Wikipedia, it became clear that there
were very few verbs that aren't relationship verbs.
Wikipedia articles describe concepts and events.
The relationship between these require the copula and other relationship
verbs:
\begin_inset Quotes eld
\end_inset
is
\begin_inset Quotes erd
\end_inset
,
\begin_inset Quotes eld
\end_inset
has
\begin_inset Quotes erd
\end_inset
,
\begin_inset Quotes eld
\end_inset
was
\begin_inset Quotes erd
\end_inset
.
Wikipedia is almost completely devoid of narrative verbs:
\begin_inset Quotes eld
\end_inset
ran
\begin_inset Quotes erd
\end_inset
\begin_inset Quotes eld
\end_inset
jumped
\begin_inset Quotes erd
\end_inset
\begin_inset Quotes eld
\end_inset
hit
\begin_inset Quotes erd
\end_inset
,
\begin_inset Quotes eld
\end_inset
ate
\begin_inset Quotes erd
\end_inset
\begin_inset Quotes eld
\end_inset
thought
\begin_inset Quotes erd
\end_inset
\begin_inset Quotes eld
\end_inset
took
\begin_inset Quotes erd
\end_inset
.
Thus, we discern two very different styles of human communication: the
exchange of facts, and the exchange of stories.
Narratives contain a far richer selection of verbs, and thus, for language
learning, a text corpus of narratives is required.
Ideally, this would be from young-adult literature, which is a bit more
direct in its kinesthetic content than adult literature might be.
\end_layout
\begin_layout Standard
* Cosine similarity applied to connector sets seems to be an effective way
of determining the grammatical similarity of words.
Yet, it is not so unambiguously great, that other kinds of measures shouldn't
be contemplated.
\end_layout
\begin_layout Standard
* Entropic similarity, essentially, a form of symmetric mutual information
between words, appears to be an even better similarity measure.
It is particularly appealing because it is naturally additive, and thus
fits naturally into network theories derived from thermodynamic partition
functions.
\end_layout
\begin_layout Subsection
Revision History
\end_layout
\begin_layout Standard
The original version of this report, dated 7 May 2017, was prepared on a
painfully small dataset, which also (may have?) incorporated a fatal bug
in the disjunct code: disjuncts were being assembled incorrectly, due to
a reversed sign in the MI calculations.
This bug was eventually uncovered, and so it seemed best to entirely discard
the initial analysis, and instead repeat it with a newer and larger dataset
that was correctly assembled.
The revised analysis was done mostly in July 2017.
Sadly, the discovery of this bug required that multiple large datasets
be discarded and reconstructed.
This caused a month of effort to be lost.
Version 1 can be accessed by digging in git, and pulling up commit 27a66643a52c
0985adc5b38caf94fc25f5e2e684 (or maybe a bit earlier, circa late June 2017,
as that is when the bug was spotted.).
\end_layout
\begin_layout Standard
Simultaneously, there was a lot of confusion about the efficacy of the cosine
similarity measure.
Initial work on cosine similarity used a filtered dataset, with the goal
of filtering to reduce
\begin_inset Quotes eld
\end_inset
noise
\begin_inset Quotes erd
\end_inset
in the dataset, as well as to manage dataset size.
It turns out that this filtering also had the undesired side-effect of
destroying much of the
\begin_inset Quotes eld
\end_inset
signal
\begin_inset Quotes erd
\end_inset
as well – it rendered many grammatically unrelated words to be judged to
be very similar.
Between the accidental sign reversal, and the excessively strong data cuts,
it was all very confusing, and has taken another month to recover from
this – I'm back to where I was in May, just older and wiser, now.
Versions 2 and 3 of this report provide the status quo.
They can be found at commit bc48712d3c2ab71383961f4a50dd6b3b4c6fd75f in
git.
\end_layout
\begin_layout Standard
Version 4 of this report expands it by considering an entropic similarity
between words, intended to supplant the cosine similarity as an effective
graph metric.
The entropic similarity is a form of symmetric mutual information between
words; it is given this oddball name so as to avoid confusion with a variety
of other contexts in which mutual information appears.
And so, Version 4 provides additional statistical analysis comparing the
entropic similarity to the cosine similarity.
\end_layout
\begin_layout Section
Dataset Characterization
\end_layout
\begin_layout Standard
Some terminology and notation are introduced next, followed by a characterizatio
n of the dataset.
This is followed by a statistical analysis of the word-disjunct pairs.
The analysis of word-similarity is left for a later section.
\end_layout
\begin_layout Subsection
Terminology
\end_layout
\begin_layout Standard
It is useful to introduce some notation for counting words, disjuncts, and
connectors.
Let
\begin_inset Formula $N(w)$
\end_inset
be the number of times that the word
\begin_inset Formula $w$
\end_inset
has been observed, in the dataset.
Let
\begin_inset Formula $N(w,d)$
\end_inset
be the number of times that the disjunct
\begin_inset Formula $d$
\end_inset
has been observed on word
\begin_inset Formula $w$
\end_inset
.
The pair
\begin_inset Formula $(w,d)$
\end_inset
is referred to as a
\begin_inset Quotes eld
\end_inset
connector set
\begin_inset Quotes erd
\end_inset
or
\begin_inset Quotes eld
\end_inset
cset
\begin_inset Quotes erd
\end_inset
in the text below.
Thus, for a word
\begin_inset Formula $w$
\end_inset
, there is a set
\begin_inset Formula $(w,*)=\left\{ (w,d)|N(w,d)>0\right\} $
\end_inset
of associated csets, called the
\begin_inset Quotes eld
\end_inset
support
\begin_inset Quotes erd
\end_inset
of the word.
The size of this set can be written using the standard notation for set-sizes
as
\begin_inset Formula $\left|(w,*)\right|$
\end_inset
.
Similarly, a disjunct
\begin_inset Formula $d$
\end_inset
, is supported by the set
\begin_inset Formula $(*,d)=\left\{ (w,d)|N(w,d)>0\right\} $
\end_inset
of associated csets.
\end_layout
\begin_layout Standard
The primary contents of the database are the counts
\begin_inset Formula $N(w,d)$
\end_inset
and everything else of interest in this section can be obtained from this.
Note that
\begin_inset Formula $N(w,d)$
\end_inset
can be understood as a matrix, where the disjuncts identify columns, and
the words identify rows.
In general, this is a very sparse matrix: the number of non-zero entries
\begin_inset Formula $\left|(*,*)\right|$
\end_inset
is far less than the number of rows times the number of columns.
\end_layout
\begin_layout Standard
Every time a word is observed in an MST parse, a disjunct is extracted for
it; thus, word observations and disjunct observations are on one-to-one
correspondence.
In notation:
\begin_inset Formula
\[
\sum_{d}N(w,d)=N(w,*)=N(w)
\]
\end_inset
Similarly, the total number of times that a disjunct was observed is just
\begin_inset Formula
\[
N(*,d)=\sum_{w}N(w,d)
\]
\end_inset
\end_layout
\begin_layout Standard
Frequencies can be obtained by dividing by the total number of observations,
so that
\begin_inset Formula $p(w,d)=N(w,d)/N(*)$
\end_inset
and
\begin_inset Formula $p(w)=N(w)/N(*)$
\end_inset
with
\begin_inset Formula $N(*)=\sum_{w}N(w)$
\end_inset
the total number of observations of words.
\end_layout
\begin_layout Standard
A single disjunct is always composed of a fixed number of connectors, independen
tly of any observations; let
\begin_inset Formula $C(d,c)$
\end_inset
be the number of times that connector
\begin_inset Formula $c$
\end_inset
appears in disjunct
\begin_inset Formula $d$
\end_inset
.
Note that
\begin_inset Formula $C(d,c)$
\end_inset
is almost always either zero or one; however, a connector can appear more
than once in a disjunct, so this count can rise to 2 or 3 or higher.
The wild-card sum
\begin_inset Formula $C(d,*)=\sum_{c}C(d,c)$
\end_inset
is the total number of connectors in the disjunct; it is the vertex degree
of all edges connecting to that disjunct.
It is also useful to define
\begin_inset Formula $C(d,+)$
\end_inset
and
\begin_inset Formula $C(d,-)$
\end_inset
as the total number of right-linking and left-linking connectors.
\end_layout
\begin_layout Subsection
Dataset characterization
\end_layout
\begin_layout Standard
The rest of this report is based on a single dataset, called 'en_pairs_rfive_mtw
o'.
It was built by performing MST parsing of of text from tranche-1 and 2,
using word-pair statistics gathered from random parses of text from tranche-1,2
,3,4,5.
\end_layout
\begin_layout Standard
These
\begin_inset Quotes eld
\end_inset
tranches
\begin_inset Quotes erd
\end_inset
consist of unannotated text corpora downloaded from the net; the specific
download scripts that were used are the 'download.sh' scripts located in
github, at https://github.com/opencog/learn/download.
Word-pair statistics are obtained by
\begin_inset Quotes eld
\end_inset
random-tree parsing
\begin_inset Quotes erd
\end_inset
.
A random-tree parse is generated by creating a random planar parse tree
for a sentence; it is planar in the sense that no links cross.
It is random in the sense that a uniform distribution is assumed on the
space of all possible planar parses.
For each link in such a parse, one simply records the two words at each
end of the link, and increments the count of that particular word pair
by one.
The random-tree method for obtaining word-pair counts results in subtly
different statistics than what would be obtained by a sliding window of
some fixed width.
In particular, the random-tree method will occasionally count long-distance
links, longer than what would be seen in a sliding window.
The difference in statistics between random-tree and sliding-window methods
has not been characterized.
It is presumed to be minor, and probably immaterial to subsequent results.
\end_layout
\begin_layout Standard
The word-pair dataset, and other similar datasets are summarized in the
language learning diary
\begin_inset CommandInset citation
LatexCommand cite
key "Vepstas2013"
\end_inset
, in the section titled
\begin_inset Quotes erd
\end_inset
Dataset report 3 June 2017
\begin_inset Quotes erd
\end_inset
.
It is repeated here, as it gives a hint of the foundation for the MST parses.
The column labels in the table below are the same as those explained there.
They are:
\end_layout
\begin_layout Description
Size The dimensions of the array.
This is the number of unique, distinct words observed occurring on the
left-side of a word pair, times the number of words occurring on the right.
We expect the dimensions to be approximately equal, as most words will
typically occur on both the left and right side of a pair.
\end_layout
\begin_layout Description
Pairs The total number of distinct word-pairs observed.
\end_layout
\begin_layout Description
Obs'ns The total number of observations of these pairs.
Most pairs will be observed more than once.
Distributions are typically Zipfian.
\end_layout
\begin_layout Description
Obs/pr The average number of times each word-pair was observed.
\end_layout
\begin_layout Description
Entropy The total entropy of these pairs in this dataset.
Denote a word-pair as
\begin_inset Formula $(w_{L},w_{R})$
\end_inset
and
\begin_inset Formula $p(w_{L},w_{R})$
\end_inset