picky-generators 3.1.0 → 3.1.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.
@@ -22,7 +22,7 @@ class BookSearch < Sinatra::Application
|
|
22
22
|
#
|
23
23
|
books_index = Index.new :books do
|
24
24
|
source Sources::CSV.new(:title, :author, :year, file: "data/#{PICKY_ENVIRONMENT}/library.csv")
|
25
|
-
indexing removes_characters: /[^a-
|
25
|
+
indexing removes_characters: /[^a-z0-9\s\/\-\_\:\"\&\.]/i,
|
26
26
|
stopwords: /\b(and|the|of|it|in|for)\b/i,
|
27
27
|
splits_text_on: /[\s\/\-\_\:\"\&\/]/
|
28
28
|
category :title,
|
@@ -42,7 +42,7 @@ class BookSearch < Sinatra::Application
|
|
42
42
|
#
|
43
43
|
books = Search.new books_index do
|
44
44
|
searching substitutes_characters_with: CharacterSubstituters::WestEuropean.new, # Normalizes special user input, Ä -> Ae, ñ -> n etc.
|
45
|
-
removes_characters: /[^a-
|
45
|
+
removes_characters: /[^a-z0-9\s\/\-\_\&\.\"\~\*\:\,]/i, # Picky needs control chars *"~:, to pass through.
|
46
46
|
stopwords: /\b(and|the|of|it|in|for)\b/i,
|
47
47
|
splits_text_on: /[\s\/\-\&]+/
|
48
48
|
|
@@ -16,14 +16,14 @@ class BookSearch < Picky::Application
|
|
16
16
|
|
17
17
|
# How text is indexed. Move to Index block to make it index specific.
|
18
18
|
#
|
19
|
-
indexing removes_characters: /[^a-
|
19
|
+
indexing removes_characters: /[^a-z0-9\s\/\-\_\:\"\&\.]/i,
|
20
20
|
stopwords: /\b(and|the|of|it|in|for)\b/i,
|
21
21
|
splits_text_on: /[\s\/\-\_\:\"\&\/]/
|
22
22
|
|
23
23
|
# How query text is preprocessed. Move to Search block to make it search specific.
|
24
24
|
#
|
25
25
|
searching substitutes_characters_with: CharacterSubstituters::WestEuropean.new, # Normalizes special user input, Ä -> Ae, ñ -> n etc.
|
26
|
-
removes_characters: /[^a-
|
26
|
+
removes_characters: /[^a-z0-9\s\/\-\_\&\.\"\~\*\:\,]/i, # Picky needs control chars *"~:, to pass through.
|
27
27
|
stopwords: /\b(and|the|of|it|in|for)\b/i,
|
28
28
|
splits_text_on: /[\s\/\-\&]+/,
|
29
29
|
maximum_tokens: 5 # Amount of tokens maximally used in a search.
|
@@ -13,7 +13,7 @@ class BookSearch < Sinatra::Application
|
|
13
13
|
#
|
14
14
|
books_index = Index.new :books do
|
15
15
|
source Sources::CSV.new(:title, :author, :year, file: "data/#{PICKY_ENVIRONMENT}/library.csv")
|
16
|
-
indexing removes_characters: /[^a-
|
16
|
+
indexing removes_characters: /[^a-z0-9\s\/\-\_\:\"\&\.]/i,
|
17
17
|
stopwords: /\b(and|the|of|it|in|for)\b/i,
|
18
18
|
splits_text_on: /[\s\/\-\_\:\"\&\/]/
|
19
19
|
category :title,
|
@@ -33,7 +33,7 @@ class BookSearch < Sinatra::Application
|
|
33
33
|
#
|
34
34
|
books = Search.new books_index do
|
35
35
|
searching substitutes_characters_with: CharacterSubstituters::WestEuropean.new, # Normalizes special user input, Ä -> Ae, ñ -> n etc.
|
36
|
-
removes_characters: /[^a-
|
36
|
+
removes_characters: /[^a-z0-9\s\/\-\_\&\.\"\~\*\:\,]/i, # Picky needs control chars *"~:, to pass through.
|
37
37
|
stopwords: /\b(and|the|of|it|in|for)\b/i,
|
38
38
|
splits_text_on: /[\s\/\-\&]+/
|
39
39
|
boost [:title, :author] => +3,
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: picky-generators
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 3.1.
|
5
|
+
version: 3.1.1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Florian Hanke
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-08-
|
13
|
+
date: 2011-08-31 00:00:00 +02:00
|
14
14
|
default_executable: picky-generate
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
requirements:
|
33
33
|
- - ~>
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: 3.1.
|
35
|
+
version: 3.1.1
|
36
36
|
type: :runtime
|
37
37
|
version_requirements: *id002
|
38
38
|
- !ruby/object:Gem::Dependency
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
requirements:
|
44
44
|
- - ~>
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: 3.1.
|
46
|
+
version: 3.1.1
|
47
47
|
type: :runtime
|
48
48
|
version_requirements: *id003
|
49
49
|
description: Generators for Picky.
|