arclight 0.0.1 → 1.4.0
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 +5 -5
- data/.all-contributorsrc +450 -0
- data/.codeclimate.yml +5 -0
- data/.eslintrc +22 -0
- data/.github/workflows/ruby.yml +44 -0
- data/.gitignore +7 -0
- data/.rspec +0 -1
- data/.rubocop.yml +362 -0
- data/.rubocop_todo.yml +122 -0
- data/.solr_wrapper +5 -0
- data/CONTRIBUTING.md +43 -0
- data/CONTRIBUTORS.md +79 -0
- data/Gemfile +41 -0
- data/LICENSE.txt +1 -0
- data/README.md +100 -12
- data/Rakefile +13 -3
- data/app/assets/images/arclight/logo.png +0 -0
- data/app/assets/images/blacklight/bookmark.svg +1 -0
- data/app/assets/images/blacklight/collection.svg +5 -0
- data/app/assets/images/blacklight/compact.svg +1 -0
- data/app/assets/images/blacklight/container.svg +5 -0
- data/app/assets/images/blacklight/ead.svg +1 -0
- data/app/assets/images/blacklight/file.svg +5 -0
- data/app/assets/images/blacklight/folder.svg +1 -0
- data/app/assets/images/blacklight/list.svg +1 -0
- data/app/assets/images/blacklight/minus.svg +1 -0
- data/app/assets/images/blacklight/online.svg +5 -0
- data/app/assets/images/blacklight/pdf.svg +1 -0
- data/app/assets/images/blacklight/plus.svg +1 -0
- data/app/assets/images/blacklight/repository.svg +1 -0
- data/app/assets/javascripts/arclight/arclight.js +4 -0
- data/app/assets/javascripts/arclight/oembed_controller.js +58 -0
- data/app/assets/javascripts/arclight/truncate_controller.js +27 -0
- data/app/assets/stylesheets/arclight/application.scss +14 -0
- data/app/assets/stylesheets/arclight/build.scss +4 -0
- data/app/assets/stylesheets/arclight/modules/collection_search.scss +3 -0
- data/app/assets/stylesheets/arclight/modules/hierarchy_and_online_contents.scss +155 -0
- data/app/assets/stylesheets/arclight/modules/highlights.scss +11 -0
- data/app/assets/stylesheets/arclight/modules/icons.scss +20 -0
- data/app/assets/stylesheets/arclight/modules/layout.scss +220 -0
- data/app/assets/stylesheets/arclight/modules/mastheads.scss +57 -0
- data/app/assets/stylesheets/arclight/modules/repositories.scss +25 -0
- data/app/assets/stylesheets/arclight/modules/repository_card.scss +9 -0
- data/app/assets/stylesheets/arclight/modules/search_form.scss +9 -0
- data/app/assets/stylesheets/arclight/modules/search_results.scss +250 -0
- data/app/assets/stylesheets/arclight/modules/show_collection.scss +38 -0
- data/app/assets/stylesheets/arclight/modules/truncator.scss +58 -0
- data/app/assets/stylesheets/arclight/responsive.scss +13 -0
- data/app/assets/stylesheets/arclight/variables.scss +25 -0
- data/app/components/arclight/access_component.html.erb +14 -0
- data/app/components/arclight/access_component.rb +25 -0
- data/app/components/arclight/bookmark_component.html.erb +25 -0
- data/app/components/arclight/bookmark_component.rb +9 -0
- data/app/components/arclight/breadcrumb_component.rb +40 -0
- data/app/components/arclight/breadcrumbs_hierarchy_component.html.erb +34 -0
- data/app/components/arclight/breadcrumbs_hierarchy_component.rb +25 -0
- data/app/components/arclight/collection_context_component.html.erb +12 -0
- data/app/components/arclight/collection_context_component.rb +27 -0
- data/app/components/arclight/collection_info_component.html.erb +28 -0
- data/app/components/arclight/collection_info_component.rb +26 -0
- data/app/components/arclight/collection_sidebar_component.html.erb +15 -0
- data/app/components/arclight/collection_sidebar_component.rb +39 -0
- data/app/components/arclight/constraints_component.html.erb +7 -0
- data/app/components/arclight/constraints_component.rb +17 -0
- data/app/components/arclight/document_collection_context_component.html.erb +29 -0
- data/app/components/arclight/document_collection_context_component.rb +28 -0
- data/app/components/arclight/document_collection_hierarchy_component.html.erb +50 -0
- data/app/components/arclight/document_collection_hierarchy_component.rb +62 -0
- data/app/components/arclight/document_component.html.erb +39 -0
- data/app/components/arclight/document_component.rb +49 -0
- data/app/components/arclight/document_components_hierarchy_component.html.erb +32 -0
- data/app/components/arclight/document_components_hierarchy_component.rb +28 -0
- data/app/components/arclight/document_download_component.html.erb +24 -0
- data/app/components/arclight/document_download_component.rb +71 -0
- data/app/components/arclight/embed_component.html.erb +10 -0
- data/app/components/arclight/embed_component.rb +43 -0
- data/app/components/arclight/group_component.html.erb +34 -0
- data/app/components/arclight/group_component.rb +23 -0
- data/app/components/arclight/header_component.html.erb +5 -0
- data/app/components/arclight/header_component.rb +10 -0
- data/app/components/arclight/index_metadata_field_component.html.erb +16 -0
- data/app/components/arclight/index_metadata_field_component.rb +20 -0
- data/app/components/arclight/masthead_component.html.erb +15 -0
- data/app/components/arclight/masthead_component.rb +10 -0
- data/app/components/arclight/metadata_section_component.html.erb +13 -0
- data/app/components/arclight/metadata_section_component.rb +22 -0
- data/app/components/arclight/oembed_viewer_component.html.erb +5 -0
- data/app/components/arclight/oembed_viewer_component.rb +16 -0
- data/app/components/arclight/online_content_filter_component.html.erb +15 -0
- data/app/components/arclight/online_content_filter_component.rb +19 -0
- data/app/components/arclight/online_status_indicator_component.rb +19 -0
- data/app/components/arclight/repository_breadcrumb_component.html.erb +10 -0
- data/app/components/arclight/repository_breadcrumb_component.rb +17 -0
- data/app/components/arclight/repository_location_component.html.erb +20 -0
- data/app/components/arclight/repository_location_component.rb +10 -0
- data/app/components/arclight/search_bar_component.html.erb +27 -0
- data/app/components/arclight/search_bar_component.rb +32 -0
- data/app/components/arclight/search_result_breadcrumbs_component.html.erb +6 -0
- data/app/components/arclight/search_result_breadcrumbs_component.rb +37 -0
- data/app/components/arclight/search_result_component.html.erb +20 -0
- data/app/components/arclight/search_result_component.rb +18 -0
- data/app/components/arclight/search_result_title_component.html.erb +15 -0
- data/app/components/arclight/search_result_title_component.rb +15 -0
- data/app/components/arclight/sidebar_component.html.erb +9 -0
- data/app/components/arclight/sidebar_component.rb +19 -0
- data/app/components/arclight/upper_metadata_layout_component.rb +10 -0
- data/app/components/blacklight/icons/bookmark_component.rb +12 -0
- data/app/components/blacklight/icons/collection_component.rb +14 -0
- data/app/components/blacklight/icons/compact_component.rb +12 -0
- data/app/components/blacklight/icons/container_component.rb +14 -0
- data/app/components/blacklight/icons/ead_component.rb +12 -0
- data/app/components/blacklight/icons/file_component.rb +14 -0
- data/app/components/blacklight/icons/folder_component.rb +12 -0
- data/app/components/blacklight/icons/online_component.rb +15 -0
- data/app/components/blacklight/icons/pdf_component.rb +12 -0
- data/app/components/blacklight/icons/repository_component.rb +12 -0
- data/app/controllers/arclight/repositories_controller.rb +40 -0
- data/app/helpers/arclight/ead_format_helpers.rb +309 -0
- data/app/helpers/arclight/field_config_helpers.rb +26 -0
- data/app/helpers/arclight_helper.rb +108 -0
- data/app/models/arclight/document_downloads.rb +122 -0
- data/app/models/arclight/parent.rb +24 -0
- data/app/models/arclight/parents.rb +39 -0
- data/app/models/arclight/requests/aeon_external_request.rb +42 -0
- data/app/models/arclight/requests/aeon_web_ead.rb +52 -0
- data/app/models/arclight/requests/google_form.rb +49 -0
- data/app/models/concerns/arclight/catalog.rb +44 -0
- data/app/models/concerns/arclight/search_behavior.rb +47 -0
- data/app/models/concerns/arclight/solr_document.rb +159 -0
- data/app/presenters/arclight/index_presenter.rb +10 -0
- data/app/presenters/arclight/show_presenter.rb +54 -0
- data/app/views/arclight/.keep +0 -0
- data/app/views/arclight/_requests.html.erb +7 -0
- data/app/views/arclight/repositories/_repository.html.erb +43 -0
- data/app/views/arclight/repositories/index.html.erb +9 -0
- data/app/views/arclight/repositories/show.html.erb +37 -0
- data/app/views/arclight/requests/_aeon_external_request_endpoint.html.erb +8 -0
- data/app/views/arclight/requests/_aeon_web_ead.html.erb +6 -0
- data/app/views/arclight/requests/_google_form.html.erb +10 -0
- data/app/views/catalog/_document_list.html.erb +8 -0
- data/app/views/catalog/_group.html.erb +4 -0
- data/app/views/catalog/_group_toggle.html.erb +10 -0
- data/app/views/catalog/_search_results_header.html.erb +3 -0
- data/app/views/catalog/hierarchy.html.erb +19 -0
- data/app/views/catalog/index.html.erb +17 -0
- data/app/views/shared/_breadcrumbs.html.erb +3 -0
- data/app/views/shared/_main_menu_links.html.erb +6 -0
- data/arclight.gemspec +29 -11
- data/bin/rails +13 -0
- data/config/breadcrumbs.rb +24 -0
- data/config/i18n-tasks.yml +134 -0
- data/config/importmap.rb +3 -0
- data/config/locales/arclight.en.yml +100 -0
- data/config/repositories.yml +0 -0
- data/config/routes.rb +6 -0
- data/docker-compose.yml +16 -0
- data/lib/arclight/digital_object.rb +27 -0
- data/lib/arclight/engine.rb +47 -0
- data/lib/arclight/exceptions.rb +19 -0
- data/lib/arclight/hash_absolute_xpath.rb +62 -0
- data/lib/arclight/level_label.rb +46 -0
- data/lib/arclight/missing_id_strategy.rb +21 -0
- data/lib/arclight/normalized_date.rb +49 -0
- data/lib/arclight/normalized_id.rb +30 -0
- data/lib/arclight/normalized_title.rb +33 -0
- data/lib/arclight/repository.rb +116 -0
- data/lib/arclight/routes/hierarchy.rb +19 -0
- data/lib/arclight/routes.rb +8 -0
- data/lib/arclight/traject/ead2_component_config.rb +334 -0
- data/lib/arclight/traject/ead2_config.rb +315 -0
- data/lib/arclight/traject/nokogiri_namespaceless_reader.rb +22 -0
- data/lib/arclight/version.rb +3 -1
- data/lib/arclight/year_range.rb +111 -0
- data/lib/arclight.rb +11 -1
- data/lib/generators/arclight/install_generator.rb +126 -0
- data/lib/generators/arclight/templates/arclight.scss +5 -0
- data/lib/generators/arclight/templates/catalog_controller.rb +422 -0
- data/lib/generators/arclight/templates/config/downloads.yml +25 -0
- data/lib/generators/arclight/templates/config/locales/arclight.en.yml +61 -0
- data/lib/generators/arclight/templates/config/repositories.yml +53 -0
- data/lib/generators/arclight/update_generator.rb +22 -0
- data/lib/tasks/index.rake +84 -0
- data/package.json +30 -0
- data/solr/conf/_rest_managed.json +3 -0
- data/solr/conf/admin-extra.html +31 -0
- data/solr/conf/elevate.xml +36 -0
- data/solr/conf/mapping-ISOLatin1Accent.txt +246 -0
- data/solr/conf/protwords.txt +21 -0
- data/solr/conf/schema.xml +400 -0
- data/solr/conf/solrconfig.xml +328 -0
- data/solr/conf/spellings.txt +2 -0
- data/solr/conf/stopwords.txt +58 -0
- data/solr/conf/stopwords_en.txt +58 -0
- data/solr/conf/synonyms.txt +31 -0
- data/solr/conf/xslt/example.xsl +132 -0
- data/solr/conf/xslt/example_atom.xsl +67 -0
- data/solr/conf/xslt/example_rss.xsl +66 -0
- data/solr/conf/xslt/luke.xsl +337 -0
- data/tasks/arclight.rake +72 -0
- data/template.rb +10 -0
- metadata +432 -20
- data/.travis.yml +0 -5
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'arclight'
|
|
4
|
+
require 'benchmark'
|
|
5
|
+
|
|
6
|
+
##
|
|
7
|
+
# Environment variables and information for indexing:
|
|
8
|
+
#
|
|
9
|
+
# REPOSITORY_ID for the repository id/slug to load repository data from
|
|
10
|
+
# your configuration (default: none).
|
|
11
|
+
#
|
|
12
|
+
# REPOSITORY_FILE for the YAML file of your repository configuration
|
|
13
|
+
# (default: config/repositories.yml).
|
|
14
|
+
#
|
|
15
|
+
# Blacklight default connection for the location of your Solr instance, SOLR_URL
|
|
16
|
+
# as a backup
|
|
17
|
+
# (default: http://127.0.0.1:8983/solr/blacklight-core)
|
|
18
|
+
#
|
|
19
|
+
namespace :arclight do
|
|
20
|
+
desc 'Index an EAD document, use FILE=<path/to/ead.xml> and REPOSITORY_ID=<myid>'
|
|
21
|
+
# We need :environment to have access to the Blacklight confg
|
|
22
|
+
task index: :environment do
|
|
23
|
+
raise 'Please specify your EAD document, ex. FILE=<path/to/ead.xml>' unless ENV['FILE']
|
|
24
|
+
|
|
25
|
+
print "Loading #{ENV.fetch('FILE', nil)} into index...\n"
|
|
26
|
+
solr_url = ENV.fetch('SOLR_URL', Blacklight.default_index.connection.base_uri)
|
|
27
|
+
elapsed_time = Benchmark.realtime do
|
|
28
|
+
`bundle exec traject -u #{solr_url} -i xml -c #{Arclight::Engine.root}/lib/arclight/traject/ead2_config.rb #{ENV.fetch('FILE', nil)}`
|
|
29
|
+
end
|
|
30
|
+
print "Indexed #{ENV.fetch('FILE', nil)} (in #{elapsed_time.round(3)} secs).\n"
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
desc 'Index a directory of EADs, use DIR=<path/to/directory> and REPOSITORY_ID=<myid>'
|
|
34
|
+
task :index_dir do
|
|
35
|
+
raise 'Please specify your directory, ex. DIR=<path/to/directory>' unless ENV['DIR']
|
|
36
|
+
|
|
37
|
+
Dir.glob(File.join(ENV.fetch('DIR', nil), '*.xml')).each do |file|
|
|
38
|
+
system("rake arclight:index FILE=#{file}")
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
desc 'Index an EAD document, use URL=<http[s]://domain/path/to/ead.xml> and REPOSITORY_ID=<myid>'
|
|
43
|
+
task :index_url do
|
|
44
|
+
raise 'Please specify your EAD document, ex. URL=<http[s]://domain/path/to/ead.xml>' unless ENV['URL']
|
|
45
|
+
|
|
46
|
+
ead = Nokogiri::XML(open(ENV.fetch('URL', nil)))
|
|
47
|
+
tmp = Tempfile.new(["#{Time.now.to_i}-", '.xml'], encoding: 'utf-8')
|
|
48
|
+
begin
|
|
49
|
+
tmp.write ead
|
|
50
|
+
puts "Downloaded EAD to #{tmp.path}"
|
|
51
|
+
ENV['FILE'] = tmp.path
|
|
52
|
+
Rake::Task['arclight:index'].invoke
|
|
53
|
+
Rake::Task['arclight:index'].reenable
|
|
54
|
+
tmp.close
|
|
55
|
+
ensure
|
|
56
|
+
tmp.delete
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
desc 'Index EADs from a file of URLs, use BATCH=<path/to/urls.txt> and REPOSITORY_ID=<myid>'
|
|
61
|
+
task :index_url_batch do
|
|
62
|
+
raise 'Please specify your URLs file, ex. BATCH=<path/to/urls.txt>' unless ENV['BATCH']
|
|
63
|
+
|
|
64
|
+
File.open(ENV.fetch('BATCH', nil)).each_line do |l|
|
|
65
|
+
ENV['URL'] = l.chomp
|
|
66
|
+
next if ENV['URL'].empty?
|
|
67
|
+
|
|
68
|
+
unless ENV.fetch('URL', nil) =~ /\A#{URI::DEFAULT_PARSER.make_regexp(%w[http https])}\z/
|
|
69
|
+
puts "Skipping invalid looking url #{ENV.fetch('URL', nil)}"
|
|
70
|
+
next
|
|
71
|
+
end
|
|
72
|
+
puts "Indexing #{ENV.fetch('URL', nil)}"
|
|
73
|
+
Rake::Task['arclight:index_url'].invoke
|
|
74
|
+
Rake::Task['arclight:index_url'].reenable
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
desc 'Destroy all documents in the index'
|
|
79
|
+
task destroy_index_docs: :environment do
|
|
80
|
+
puts 'Deleting all documents from index...'
|
|
81
|
+
Blacklight.default_index.connection.delete_by_query('*:*')
|
|
82
|
+
Blacklight.default_index.connection.commit
|
|
83
|
+
end
|
|
84
|
+
end
|
data/package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "arclight",
|
|
3
|
+
"version": "1.4.0",
|
|
4
|
+
"description": "The frontend for arclight",
|
|
5
|
+
"main": "app/assets/javascript/arclight/arclight.js",
|
|
6
|
+
"files": ["app/assets"],
|
|
7
|
+
"devDependencies": {
|
|
8
|
+
"eslint": "^8.26.0",
|
|
9
|
+
"eslint-config-airbnb-base": "^15.0.0",
|
|
10
|
+
"eslint-plugin-import": "^2.2.0",
|
|
11
|
+
"sass": "^1.59.3",
|
|
12
|
+
"bootstrap": "^5.2.0"
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "sass ./app/assets/stylesheets/arclight/build.scss:./app/assets/builds/arclight.css --no-source-map --load-path=node_modules",
|
|
16
|
+
"lint": "eslint './app/assets/javascripts/**/*.{js,es6}'",
|
|
17
|
+
"lint:fix": "eslint --fix './app/assets/javascripts/**/*.{js,es6}'",
|
|
18
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
19
|
+
},
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "https://github.com/projectblacklight/arclight.git"
|
|
23
|
+
},
|
|
24
|
+
"author": "",
|
|
25
|
+
"license": "Apache-2.0",
|
|
26
|
+
"bugs": {
|
|
27
|
+
"url": "https://github.com/projectblacklight/arclight/issues"
|
|
28
|
+
},
|
|
29
|
+
"homepage": "https://library.stanford.edu/projects/arclight"
|
|
30
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
3
|
+
contributor license agreements. See the NOTICE file distributed with
|
|
4
|
+
this work for additional information regarding copyright ownership.
|
|
5
|
+
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
6
|
+
(the "License"); you may not use this file except in compliance with
|
|
7
|
+
the License. You may obtain a copy of the License at
|
|
8
|
+
|
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
|
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
See the License for the specific language governing permissions and
|
|
15
|
+
limitations under the License.
|
|
16
|
+
-->
|
|
17
|
+
|
|
18
|
+
<!-- The content of this page will be statically included into the top
|
|
19
|
+
of the admin page. Uncomment this as an example to see there the content
|
|
20
|
+
will show up.
|
|
21
|
+
|
|
22
|
+
<hr>
|
|
23
|
+
<i>This line will appear before the first table</i>
|
|
24
|
+
<tr>
|
|
25
|
+
<td colspan="2">
|
|
26
|
+
This row will be appended to the end of the first table
|
|
27
|
+
</td>
|
|
28
|
+
</tr>
|
|
29
|
+
<hr>
|
|
30
|
+
|
|
31
|
+
-->
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" ?>
|
|
2
|
+
<!--
|
|
3
|
+
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
4
|
+
contributor license agreements. See the NOTICE file distributed with
|
|
5
|
+
this work for additional information regarding copyright ownership.
|
|
6
|
+
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
7
|
+
(the "License"); you may not use this file except in compliance with
|
|
8
|
+
the License. You may obtain a copy of the License at
|
|
9
|
+
|
|
10
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
|
|
12
|
+
Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
See the License for the specific language governing permissions and
|
|
16
|
+
limitations under the License.
|
|
17
|
+
-->
|
|
18
|
+
|
|
19
|
+
<!-- If this file is found in the config directory, it will only be
|
|
20
|
+
loaded once at startup. If it is found in Solr's data
|
|
21
|
+
directory, it will be re-loaded every commit.
|
|
22
|
+
-->
|
|
23
|
+
|
|
24
|
+
<elevate>
|
|
25
|
+
<query text="foo bar">
|
|
26
|
+
<doc id="1" />
|
|
27
|
+
<doc id="2" />
|
|
28
|
+
<doc id="3" />
|
|
29
|
+
</query>
|
|
30
|
+
|
|
31
|
+
<query text="ipod">
|
|
32
|
+
<doc id="MA147LL/A" /> <!-- put the actual ipod at the top -->
|
|
33
|
+
<doc id="IW-02" exclude="true" /> <!-- exclude this cable -->
|
|
34
|
+
</query>
|
|
35
|
+
|
|
36
|
+
</elevate>
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
# The ASF licenses this file to You under the Apache License, Version 2.0
|
|
2
|
+
# (the "License"); you may not use this file except in compliance with
|
|
3
|
+
# the License. You may obtain a copy of the License at
|
|
4
|
+
#
|
|
5
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
#
|
|
7
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
8
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
9
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
10
|
+
# See the License for the specific language governing permissions and
|
|
11
|
+
# limitations under the License.
|
|
12
|
+
|
|
13
|
+
# Syntax:
|
|
14
|
+
# "source" => "target"
|
|
15
|
+
# "source".length() > 0 (source cannot be empty.)
|
|
16
|
+
# "target".length() >= 0 (target can be empty.)
|
|
17
|
+
|
|
18
|
+
# example:
|
|
19
|
+
# "??" => "A"
|
|
20
|
+
# "\u00C0" => "A"
|
|
21
|
+
# "\u00C0" => "\u0041"
|
|
22
|
+
# "??" => "ss"
|
|
23
|
+
# "\t" => " "
|
|
24
|
+
# "\n" => ""
|
|
25
|
+
|
|
26
|
+
# ?? => A
|
|
27
|
+
"\u00C0" => "A"
|
|
28
|
+
|
|
29
|
+
# ?? => A
|
|
30
|
+
"\u00C1" => "A"
|
|
31
|
+
|
|
32
|
+
# ?? => A
|
|
33
|
+
"\u00C2" => "A"
|
|
34
|
+
|
|
35
|
+
# ?? => A
|
|
36
|
+
"\u00C3" => "A"
|
|
37
|
+
|
|
38
|
+
# ?? => A
|
|
39
|
+
"\u00C4" => "A"
|
|
40
|
+
|
|
41
|
+
# ?? => A
|
|
42
|
+
"\u00C5" => "A"
|
|
43
|
+
|
|
44
|
+
# ?? => AE
|
|
45
|
+
"\u00C6" => "AE"
|
|
46
|
+
|
|
47
|
+
# ?? => C
|
|
48
|
+
"\u00C7" => "C"
|
|
49
|
+
|
|
50
|
+
# ?? => E
|
|
51
|
+
"\u00C8" => "E"
|
|
52
|
+
|
|
53
|
+
# ?? => E
|
|
54
|
+
"\u00C9" => "E"
|
|
55
|
+
|
|
56
|
+
# ?? => E
|
|
57
|
+
"\u00CA" => "E"
|
|
58
|
+
|
|
59
|
+
# ?? => E
|
|
60
|
+
"\u00CB" => "E"
|
|
61
|
+
|
|
62
|
+
# ?? => I
|
|
63
|
+
"\u00CC" => "I"
|
|
64
|
+
|
|
65
|
+
# ?? => I
|
|
66
|
+
"\u00CD" => "I"
|
|
67
|
+
|
|
68
|
+
# ?? => I
|
|
69
|
+
"\u00CE" => "I"
|
|
70
|
+
|
|
71
|
+
# ?? => I
|
|
72
|
+
"\u00CF" => "I"
|
|
73
|
+
|
|
74
|
+
# ?? => IJ
|
|
75
|
+
"\u0132" => "IJ"
|
|
76
|
+
|
|
77
|
+
# ?? => D
|
|
78
|
+
"\u00D0" => "D"
|
|
79
|
+
|
|
80
|
+
# ?? => N
|
|
81
|
+
"\u00D1" => "N"
|
|
82
|
+
|
|
83
|
+
# ?? => O
|
|
84
|
+
"\u00D2" => "O"
|
|
85
|
+
|
|
86
|
+
# ?? => O
|
|
87
|
+
"\u00D3" => "O"
|
|
88
|
+
|
|
89
|
+
# ?? => O
|
|
90
|
+
"\u00D4" => "O"
|
|
91
|
+
|
|
92
|
+
# ?? => O
|
|
93
|
+
"\u00D5" => "O"
|
|
94
|
+
|
|
95
|
+
# ?? => O
|
|
96
|
+
"\u00D6" => "O"
|
|
97
|
+
|
|
98
|
+
# ?? => O
|
|
99
|
+
"\u00D8" => "O"
|
|
100
|
+
|
|
101
|
+
# ?? => OE
|
|
102
|
+
"\u0152" => "OE"
|
|
103
|
+
|
|
104
|
+
# ??
|
|
105
|
+
"\u00DE" => "TH"
|
|
106
|
+
|
|
107
|
+
# ?? => U
|
|
108
|
+
"\u00D9" => "U"
|
|
109
|
+
|
|
110
|
+
# ?? => U
|
|
111
|
+
"\u00DA" => "U"
|
|
112
|
+
|
|
113
|
+
# ?? => U
|
|
114
|
+
"\u00DB" => "U"
|
|
115
|
+
|
|
116
|
+
# ?? => U
|
|
117
|
+
"\u00DC" => "U"
|
|
118
|
+
|
|
119
|
+
# ?? => Y
|
|
120
|
+
"\u00DD" => "Y"
|
|
121
|
+
|
|
122
|
+
# ?? => Y
|
|
123
|
+
"\u0178" => "Y"
|
|
124
|
+
|
|
125
|
+
# ?? => a
|
|
126
|
+
"\u00E0" => "a"
|
|
127
|
+
|
|
128
|
+
# ?? => a
|
|
129
|
+
"\u00E1" => "a"
|
|
130
|
+
|
|
131
|
+
# ?? => a
|
|
132
|
+
"\u00E2" => "a"
|
|
133
|
+
|
|
134
|
+
# ?? => a
|
|
135
|
+
"\u00E3" => "a"
|
|
136
|
+
|
|
137
|
+
# ?? => a
|
|
138
|
+
"\u00E4" => "a"
|
|
139
|
+
|
|
140
|
+
# ?? => a
|
|
141
|
+
"\u00E5" => "a"
|
|
142
|
+
|
|
143
|
+
# ?? => ae
|
|
144
|
+
"\u00E6" => "ae"
|
|
145
|
+
|
|
146
|
+
# ?? => c
|
|
147
|
+
"\u00E7" => "c"
|
|
148
|
+
|
|
149
|
+
# ?? => e
|
|
150
|
+
"\u00E8" => "e"
|
|
151
|
+
|
|
152
|
+
# ?? => e
|
|
153
|
+
"\u00E9" => "e"
|
|
154
|
+
|
|
155
|
+
# ?? => e
|
|
156
|
+
"\u00EA" => "e"
|
|
157
|
+
|
|
158
|
+
# ?? => e
|
|
159
|
+
"\u00EB" => "e"
|
|
160
|
+
|
|
161
|
+
# ?? => i
|
|
162
|
+
"\u00EC" => "i"
|
|
163
|
+
|
|
164
|
+
# ?? => i
|
|
165
|
+
"\u00ED" => "i"
|
|
166
|
+
|
|
167
|
+
# ?? => i
|
|
168
|
+
"\u00EE" => "i"
|
|
169
|
+
|
|
170
|
+
# ?? => i
|
|
171
|
+
"\u00EF" => "i"
|
|
172
|
+
|
|
173
|
+
# ?? => ij
|
|
174
|
+
"\u0133" => "ij"
|
|
175
|
+
|
|
176
|
+
# ?? => d
|
|
177
|
+
"\u00F0" => "d"
|
|
178
|
+
|
|
179
|
+
# ?? => n
|
|
180
|
+
"\u00F1" => "n"
|
|
181
|
+
|
|
182
|
+
# ?? => o
|
|
183
|
+
"\u00F2" => "o"
|
|
184
|
+
|
|
185
|
+
# ?? => o
|
|
186
|
+
"\u00F3" => "o"
|
|
187
|
+
|
|
188
|
+
# ?? => o
|
|
189
|
+
"\u00F4" => "o"
|
|
190
|
+
|
|
191
|
+
# ?? => o
|
|
192
|
+
"\u00F5" => "o"
|
|
193
|
+
|
|
194
|
+
# ?? => o
|
|
195
|
+
"\u00F6" => "o"
|
|
196
|
+
|
|
197
|
+
# ?? => o
|
|
198
|
+
"\u00F8" => "o"
|
|
199
|
+
|
|
200
|
+
# ?? => oe
|
|
201
|
+
"\u0153" => "oe"
|
|
202
|
+
|
|
203
|
+
# ?? => ss
|
|
204
|
+
"\u00DF" => "ss"
|
|
205
|
+
|
|
206
|
+
# ?? => th
|
|
207
|
+
"\u00FE" => "th"
|
|
208
|
+
|
|
209
|
+
# ?? => u
|
|
210
|
+
"\u00F9" => "u"
|
|
211
|
+
|
|
212
|
+
# ?? => u
|
|
213
|
+
"\u00FA" => "u"
|
|
214
|
+
|
|
215
|
+
# ?? => u
|
|
216
|
+
"\u00FB" => "u"
|
|
217
|
+
|
|
218
|
+
# ?? => u
|
|
219
|
+
"\u00FC" => "u"
|
|
220
|
+
|
|
221
|
+
# ?? => y
|
|
222
|
+
"\u00FD" => "y"
|
|
223
|
+
|
|
224
|
+
# ?? => y
|
|
225
|
+
"\u00FF" => "y"
|
|
226
|
+
|
|
227
|
+
# ??? => ff
|
|
228
|
+
"\uFB00" => "ff"
|
|
229
|
+
|
|
230
|
+
# ??? => fi
|
|
231
|
+
"\uFB01" => "fi"
|
|
232
|
+
|
|
233
|
+
# ??? => fl
|
|
234
|
+
"\uFB02" => "fl"
|
|
235
|
+
|
|
236
|
+
# ??? => ffi
|
|
237
|
+
"\uFB03" => "ffi"
|
|
238
|
+
|
|
239
|
+
# ??? => ffl
|
|
240
|
+
"\uFB04" => "ffl"
|
|
241
|
+
|
|
242
|
+
# ??? => ft
|
|
243
|
+
"\uFB05" => "ft"
|
|
244
|
+
|
|
245
|
+
# ??? => st
|
|
246
|
+
"\uFB06" => "st"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# The ASF licenses this file to You under the Apache License, Version 2.0
|
|
2
|
+
# (the "License"); you may not use this file except in compliance with
|
|
3
|
+
# the License. You may obtain a copy of the License at
|
|
4
|
+
#
|
|
5
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
#
|
|
7
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
8
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
9
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
10
|
+
# See the License for the specific language governing permissions and
|
|
11
|
+
# limitations under the License.
|
|
12
|
+
|
|
13
|
+
#-----------------------------------------------------------------------
|
|
14
|
+
# Use a protected word file to protect against the stemmer reducing two
|
|
15
|
+
# unrelated words to the same base word.
|
|
16
|
+
|
|
17
|
+
# Some non-words that normally won't be encountered,
|
|
18
|
+
# just to test that they won't be stemmed.
|
|
19
|
+
dontstems
|
|
20
|
+
zwhacky
|
|
21
|
+
|