sixarm_ruby_freebase
SixArm.com » Ruby » Freebase client with a simple way to query Freebase.com
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (7.1%) to scientific vocabulary
Keywords
Repository
SixArm.com » Ruby » Freebase client with a simple way to query Freebase.com
Basic Info
- Host: GitHub
- Owner: SixArm
- License: other
- Language: Ruby
- Default Branch: main
- Homepage: http://sixarm.com
- Size: 326 KB
Statistics
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
SixArm.com → Ruby →
Freebase client with a simple way to query Freebase.com
- Doc: http://sixarm.com/sixarm_ruby_freebase/doc
- Gem: http://rubygems.org/gems/sixarm_ruby_freebase
- Repo: http://github.com/sixarm/sixarm_ruby_freebase <!--header-shut-->
Introduction
Freebase client with a simple way to query Freebase.com
For docs go to http://sixarm.com/sixarm_ruby_freebase/doc
Want to help? We're happy to get pull requests.
Install
Gem
To install this gem in your shell or terminal:
gem install sixarm_ruby_freebase
Gemfile
To add this gem to your Gemfile:
gem 'sixarm_ruby_freebase'
Require
To require the gem in your code:
require 'sixarm_ruby_freebase'
Examples
Install:
gem install sixarm_ruby_freebase
Example:
require "sixarm_ruby_freebase"
require "pp"
query = '{"id":"/en/china","capital":null,"type":"/location/country"}'
pp Freebase.read(query)
#=> {"id"=>"/en/china", "type"=>"/location/country", "capital"=>"Beijing"}
pp Freebase.read(query)['capital']
#=> "Beijing"
Example of multiple queries"
query1 = '{"id":"/en/india","capital":null,"type":"/location/country"}'
query2 = '{"id":"/en/japan","capital":null,"type":"/location/country"}'
pp Freebase.read(query1,query2)
#=> [{"id"=>"/en/india", "type"=>"/location/country", "capital"=>"New Delhi"},
{"id"=>"/en/japan", "type"=>"/location/country", "capital"=>"Tokyo"}]
pp Freebase.read(query1,query2).map{|result| result['capital']}
#=> ["New Delhi","Tokyo"]
Name Query
Example:
query = Freebase.name_query('Cher')
#=> {"/type/reflect/any_value"=>[{
"lang"=>"/lang/en",
"link|="=>
[
"/type/object/name",
"/common/topic/alias"
],
"type"=>"/type/text",
"value"=>"cher"
}],
"t1:type"=>"/people/person",
"t2:type"=>"/common/topic",
"t3:type"=>{
"name"=>"/people/deceased_person",
"optional"=>"optional"
},
"id"=>"null"
}
Example of finding a person's id:
Freebase.read(Freebase.name_query('Cher'))['id']
#=> "/en/cher"
Query Formats
You can provide a query as a JSON string or as a Hash.
The query methods will convert:
- a Hash to a JSON string e.g. {:foo=>'bar'} to '{"foo":"bar"}
- a nil value to the freebase 'null' string e.g. {:foo=>nil} to {"foo":null}
- anything else: we call tos then tojson
Owner
- Name: SixArm
- Login: SixArm
- Kind: organization
- Email: sixarm@sixarm.com
- Location: San Francisco
- Website: http://sixarm.com
- Twitter: sixarm
- Repositories: 580
- Profile: https://github.com/SixArm
SixArm Software
Citation (CITATION.cff)
cff-version: 1.2.0
title: SixArm.com → Ruby → <br> Freebase client with a simple way to query Freebase.com
message: >-
If you use this work and you want to cite it,
then you can use the metadata from this file.
type: software
authors:
- given-names: Joel Parker
family-names: Henderson
email: joel@joelparkerhenderson.com
affiliation: joelparkerhenderson.com
orcid: 'https://orcid.org/0009-0000-4681-282X'
identifiers:
- type: url
value: 'https://github.com/SixArm/sixarm_ruby_freebase/'
description: SixArm.com → Ruby → <br> Freebase client with a simple way to query Freebase.com
repository-code: 'https://github.com/SixArm/sixarm_ruby_freebase/'
abstract: >-
SixArm.com → Ruby → <br> Freebase client with a simple way to query Freebase.com
license: See license file
GitHub Events
Total
- Push event: 1
Last Year
- Push event: 1
Committers
Last synced: 11 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Joel Parker Henderson | j****l@j****m | 73 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 9 months ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- minitest >= 5.11.1, < 6 development
- rake >= 12.3.0, < 13 development
- simplecov >= 0.14.1, < 2 development
- sixarm_ruby_minitest_extensions >= 1.0.8, < 2 development
- json_pure >= 1.8.2, < 2