citesight 0.0.1 → 0.0.2

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/citesight.rb +3 -3
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 60b2a4cc5aaf0a5c7b4f29aa1f7adc0912e2d83a
4
- data.tar.gz: 38770a64ec74e3bd40eddc6bb05ad3911a9ca058
3
+ metadata.gz: e6f66b9de41b2a4a0a02d246d159983b87073d07
4
+ data.tar.gz: be94cccf8db8a73bb7af1ec613216f635eb107a2
5
5
  SHA512:
6
- metadata.gz: f8745a2261b85156d191068357b10210c82fabd510a7a6206a3cfb27a9643b325a7265b5eb88aba846c18b4e82179e640be0f46b66d79d413860db9bd80226c1
7
- data.tar.gz: 42cb14f320069779e39427bc94dd745e7703a67b33793f32410b456a6dbca0687742e629f15f93e8a2cab64e0cbbfca7264242cceabe2c4afc731c5214c13b05
6
+ metadata.gz: 26a9a92a8ae300c1506dfc78e684da90c90c9170272cd8deb6d40111c73dcef7498b5e7b26520242966823cdc579d4e32703b9d3f5691115f2bf65d94d93230d
7
+ data.tar.gz: 80c966d85b5074dda890e9be2753c5880541f29027ae4166099b937acdd5a873bc8fa0edd679f871f6597d12db69d00d140318e29baa445195ebc07e0de0ca1b
data/lib/citesight.rb CHANGED
@@ -13,7 +13,7 @@ class PaperCitations
13
13
  def unique_cites
14
14
  # clean citations of slashes, commas, semi-colons, possesives
15
15
  clean_cites = @contents.scan(cite_match).map do |c|
16
- c[0].gsub(/[\(\),;]|([\'\’]s)/, '').gsub(/[\'\’]\s/, ' ')
16
+ c[0].gsub(/[\(\),;]|([\'\u2019]s)/, '').gsub(/[\'\u2019]\s/, ' ')
17
17
  end
18
18
 
19
19
  # create hash of citations (key) with counts (value)
@@ -27,14 +27,14 @@ class PaperCitations
27
27
  end
28
28
 
29
29
  def name
30
- "(#{prefix}?[A-Z][[:alpha:]\'\’\-]+)" # name: caps, accents, 's
30
+ "(#{prefix}?[A-Z][[:alpha:]\'\u2019\-]+)" # name: caps, accents, 's
31
31
  end
32
32
 
33
33
  def cite_match
34
34
  /(
35
35
  #{name}{1} # first author
36
36
  ([ ]and[ ]#{name} | ([ ]et[ ]al.){1})? # remaining authors
37
- ([\'\’]s|s[\'\’])? # possessive form
37
+ ([\'\u2019]s|s[\'\u2019])? # possessive form
38
38
  ([ ][\(]?[1-2][0-9]{3}[a-z]?[,\)\;]) # year
39
39
  )/x
40
40
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: citesight
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Soumya Ray
@@ -38,7 +38,7 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
- description: Extract and analyze citations from APA style paper
41
+ description: Extract and analyze citations from APA style text
42
42
  email: soumya.ray@gmail.com
43
43
  executables:
44
44
  - citesight