anystyle-parser 0.0.4 → 0.0.5

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.
data/HISTORY.md CHANGED
@@ -1,6 +1,7 @@
1
- 0.0.4 / 2011-09-06
1
+ 0.0.5 / 2011-09-06
2
2
  ==================
3
- * Improves name tokenizing
3
+ * Improved punctuation feature elicitation
4
+ * Improved name tokenizing
4
5
  * Bugfixes
5
6
 
6
7
  0.0.1 / 2011-09-05
@@ -128,18 +128,22 @@ module Anystyle
128
128
  case token
129
129
  when /^["'”’´‘“`]/
130
130
  :quote
131
- when /["'”’´‘“`]$/
131
+ when /["'”’´‘“`][!\?\."',;:-]?$/
132
132
  :unquote
133
- when /-+/
134
- :hyphen
133
+ when /^[\(\[\{<].*[>\}\]\)][\.]$/
134
+ :'terminal-braces'
135
+ when /^[\(\[\{<].*[>\}\]\)][,;:-]$/
136
+ :'internal-braces'
137
+ when /^[\(\[\{<].*[>\}\]\)]$/
138
+ :braces
135
139
  when /[,;:-]$/
136
140
  :internal
137
141
  when /[!\?\."']$/
138
142
  :terminal
139
- when /^[\(\[\{<].*[>\}\]\)].?$/
140
- :braces
141
143
  when /^\d{2,5}\(\d{2,5}\).?$/
142
144
  :volume
145
+ when /-+/
146
+ :hyphen
143
147
  else
144
148
  :others
145
149
  end