Skip to content

rsinger/free_cite

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# Install instructions from a SuSE 10.1 development environment

== Install required packages ==

wget http://superb-west.dl.sourceforge.net/sourceforge/crfpp/CRF++-0.47.tar.gz
tar xvzf CRF++-0.47.tar.gz
cd CRF++-0.47
./configure && make && sudo make install
cd CRF++-0.47/ruby
ruby extconf.rb
make
sudo make install

If you are running fedora, you will have to take these additional steps:
su
echo "/usr/local/lib" > /etc/ld.so.conf.d/default-i386.conf
ldconfig

sudo gem install -v=2.3.14 rails

FreeCite should now work with any ActiveRecord supported database (Postgres, MySQL, SQLite, etc.)

== Train the model == 

# A trained model is checked in to the repo, so this step is not necessary 
# unless you are making local changes. 

> rake crfparser:train_model

== Using the API ==

http://0.0.0.0:3000/citations/create
 * (required argument) citation or citation[] - a citation or array of 
   citations to parse
 * Accept: text/xml or text/html

If accepting xml, returns the parsed citation string and resulting context 
object in xml format. 
If accepting html returns the parsed citation string as spans.

examples:

# in ruby:
require 'net/http'

Net::HTTP.start('localhost', 3000) do |http|
  response = http.post('/citations/create',
    'citation=A. Bookstein and S. T. Klein,   Detecting content-bearing words by serial clustering,   Proceedings of the Nineteenth Annual International ACM SIGIR Conference on Research and Development in Information Retrieval,   pp. 319327,   1995.',
    'Accept' => 'text/xml')

  puts "Code: #{response.code}"
  puts "Message: #{response.message}"
  puts "Body:\n #{response.body}"
end

# with curl
curl -H 'Accept: text/xml' -d "citation[]=Fielderman, A., Silvester, G., Gatsonis, C.A., Hoenig, J., Flynn, S. Prognostic significance of flow cytometric DNA analysis and proliferative index in stage I non-small cell lung cancer. American Review of Respiratory Disease, 1992; 146:707-710.&citation[]=Udvarhelyi, I.S., Gatsonis, C.A., Epstein, A.M., Pashos, C.L., Newhouse, J.P. and McNeil, B.J. Acute Myocardial Infarction in the Medicare population: process of care and clinical outcomes. Journal of the American Medical Association, 1992; 18:2530-2536.  " http://0.0.0.0:3000/citations/create

== Using the Web App ==
http://0.0.0.0:3000/citations/create

Enter a citation, or a list of citations separated by newlines.
Should be self-explanatory.

About

web app for parsing citations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 92.5%
  • JavaScript 7.5%