Skip to content

Instantly share code, notes, and snippets.

@awead
Last active August 29, 2015 14:16
Show Gist options
  • Save awead/26d6f990aa0df6eeef2c to your computer and use it in GitHub Desktop.
Save awead/26d6f990aa0df6eeef2c to your computer and use it in GitHub Desktop.
RDF parsing
First example: rspec spec/integration/rdf_migration_spec.rb:39
This is currenly passing.
Encoding detection: {"encoding"=>"utf-8", "confidence"=>0.99}
Original description content:
"Objectives:\\r\\n• Explain the role of a new genomic assay (Target Now™) in guiding oncology treatment plans."
Gets altered via ::updated_datastream_content
"Objectives:\\r\\n• Explain the role of a new genomic assay (Target Now™) in guiding oncology treatment plans."
Here's the object from the RDF::NTriples::Reader instance
#<RDF::Literal:0x3ffb5056567c("Objectives:\r\n• Explain the role of a new genomic assay (Target Now™) in guiding oncology treatment plans.\r\n• Describe the Target Now™ assay.\r\n• Present a case study where Target Now™ was instrumental in the patient’s treatment plan.")>
Second example: spec/integration/rdf_migration_spec.rb:58
This one currently fails.
Encoding detection: {"encoding"=>"ascii", "confidence"=>1.0}
Original description content:
Data for:\\r\\nJournal: Journal of Geophysical Research: Solid Earth\\r\\n\\r\\nArticle title:"
Gets altered via ::updated_datastream_content
"Data for:\\r\\nJournal: Journal of Geophysical Research: Solid Earth\\r\\n\\r\\nArticle title:"
Here's the object from the RDF::NTriples::Reader instance
#<RDF::Literal:0x3fd2ad267f90("Data for:\r\nJournal: Journal of Geophysical Research: Solid Earth\r\nArticle title: \"On the Origin and Evolution of Electrical Signals During Frictional Stick-Slip in Sheared Granular Material\"")>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment