Project

citesight

0.0
Low commit activity in last 3 years
A long-lived project that still receives updates
Extract and analyze citations from MISQ and APA style text
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 5.20
 Project Readme

citesight

Gem Version Build Status

home: https://github.com/soumyaray/citesight Gem to extract and report on citations in an academic text

Usage

This gem may be used as a command line utility or called from code

CLI

citesight mydoc.txt

Code example

require 'citesight'
require 'pp'

contents = File.read("spec/testfiles/large_test.txt", :encoding => "UTF-8")
paper = PaperCitations.new(contents)
cites = paper.unique_cites

puts "\nTotal unique citations: #{cites.count}"
PP.pp(Hash[cites])

top_cite = cites.sort_by { |_c, count| count}.reverse.first[0]
puts "\nYour top citation: #{top_cite}"

top_cite_indexes = paper.index_of_cite(top_cite)
puts "It was cited at locations: #{top_cite_indexes.join(', ')}"