suffix_tree 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/lib/data/base_data_source.rb +44 -0
- data/lib/data/data_source_factory.rb +16 -0
- data/lib/data/file_data_source.rb +29 -0
- data/lib/data/line_state_machine.rb +86 -0
- data/lib/data/string_data_source.rb +31 -0
- data/lib/data/word_data_source.rb +229 -0
- data/lib/location.rb +165 -0
- data/lib/node.rb +63 -0
- data/lib/node_factory.rb +169 -0
- data/lib/persist/suffix_tree_db.rb +148 -0
- data/lib/search/searcher.rb +68 -0
- data/lib/suffix_linker.rb +16 -0
- data/lib/suffix_tree.rb +122 -0
- data/lib/visitor/base_visitor.rb +17 -0
- data/lib/visitor/bfs.rb +22 -0
- data/lib/visitor/data_source_visitor.rb +15 -0
- data/lib/visitor/dfs.rb +34 -0
- data/lib/visitor/k_common_visitor.rb +71 -0
- data/lib/visitor/leaf_count_visitor.rb +15 -0
- data/lib/visitor/node_count_visitor.rb +16 -0
- data/lib/visitor/numbering_visitor.rb +230 -0
- data/lib/visitor/suffix_offset_visitor.rb +23 -0
- data/lib/visitor/tree_print_visitor.rb +44 -0
- data/lib/visitor/value_depth_visitor.rb +34 -0
- data/spec/constant_lca_spec.rb +27 -0
- data/spec/data_source_spec.rb +51 -0
- data/spec/fixtures/arizona.txt +1 -0
- data/spec/fixtures/chapter1.txt +371 -0
- data/spec/fixtures/chapter1.txt.summary +3 -0
- data/spec/fixtures/chapter1.txt.values +0 -0
- data/spec/fixtures/chapter1.txt.words +1329 -0
- data/spec/fixtures/mississippi.txt +1 -0
- data/spec/fixtures/singlePara.txt +41 -0
- data/spec/fixtures/smallFile.txt +3 -0
- data/spec/fixtures/smallFile.txt.summary +2 -0
- data/spec/fixtures/smallFile.txt.values +0 -0
- data/spec/fixtures/smallFile.txt.words +14 -0
- data/spec/fixtures/testbook.txt +5414 -0
- data/spec/location_spec.rb +149 -0
- data/spec/node_factory_spec.rb +199 -0
- data/spec/search_spec.rb +182 -0
- data/spec/suffix_tree_spec.rb +270 -0
- data/spec/util_spec.rb +47 -0
- data/spec/visitor_spec.rb +310 -0
- metadata +87 -0
@@ -0,0 +1 @@
|
|
1
|
+
mississippi
|
@@ -0,0 +1,41 @@
|
|
1
|
+
I was born in the ancient town of Angora, Asia Minor, famous not alone
|
2
|
+
for its silky-haired cats and goats, but also for its historical and
|
3
|
+
archæological importance, and with it my memories of early days, and
|
4
|
+
therefore the pages of my desultory journal, naturally begin. Men
|
5
|
+
of learning who have engaged in researches into the archæology and
|
6
|
+
biblical history of Asia Minor have come to the conclusion that this
|
7
|
+
town was once in the remote past the principal centre of a wandering
|
8
|
+
branch of the Celtic peoples who ultimately settled in Asia Minor.
|
9
|
+
Although, of course, it was conquered and held during later generations
|
10
|
+
by the Eastern invaders, it is even nowadays noticeable that there
|
11
|
+
is a difference, both of character and physique, between most of
|
12
|
+
the inhabitants of our province and those of other provinces, more
|
13
|
+
especially of Southern and Eastern Asia Minor. By remarking on this I
|
14
|
+
do not wish to seem to be trying to trace my origin to a European race,
|
15
|
+
though I am aware that many people in this country are unsympathetic,
|
16
|
+
and even, perhaps, prejudiced, where Orientals are concerned. My
|
17
|
+
paternal ancestors came across from Central Asia, and first settled in
|
18
|
+
Khorassan, in Persia. But as they were devout followers of the orthodox
|
19
|
+
creed of the Arabian Prophet they were subjected to the intolerant
|
20
|
+
oppression of the Persian Moslems, between whom and the orthodox
|
21
|
+
believers the history of Western Asia records many a sanguinary
|
22
|
+
feud, the result of their doctrinal antagonism. My ancestors were
|
23
|
+
compelled eventually to emigrate to Asia Minor over a hundred and
|
24
|
+
fifty years ago, and there they found a more hospitable reception. My
|
25
|
+
great-grandfather was the sheikh or head of a religious order called
|
26
|
+
_Halvati_, or, to give the name an English equivalent, "those who
|
27
|
+
worship in seclusion." The name arises from one of the strict rules
|
28
|
+
of the order, that its rites must not be displayed to the outside
|
29
|
+
public, doubtless a measure for the prevention of hypocrisy. Historical
|
30
|
+
research has traced the foundation of the order to Ali, the son-in-law
|
31
|
+
of Mohammed. Shortly after settling in Asia Minor the disciples of
|
32
|
+
the great sheikh increased to a number approaching eighty thousand,
|
33
|
+
and pilgrims came to his monastic dwelling from all the neighbouring
|
34
|
+
provinces. It was not only in Anatolia and Syria that his name was
|
35
|
+
honoured; he is mentioned with reverence in the books written in Egypt
|
36
|
+
at that time. It must not be imagined that he was a kind of _Mahdi_,
|
37
|
+
a name which is familiar in England on account of its having been
|
38
|
+
assumed by the late pretender in the Soudan. In the days gone by many
|
39
|
+
such Mahdis, or "redeemers," appeared in Western Asia and the Northern
|
40
|
+
half of Africa, disguising under this apostolic name their ambition of
|
41
|
+
attaining temporal power and worldly glory.
|
Binary file
|