Download the PHP package botk/core without Composer

On this page you can find all versions of the php package botk/core. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package core

logo

BOTK\Core

Build Status Scrutinizer Code Quality Code Coverage Latest Version Total Downloads License

Super lightweight base classes for developing smart gateways to populate RDF knowlege base.

Installation

The package is available on Packagist. You can install it using Composer:

composer require botk/core

Overview

This package provides some simple tools to transform raw data into rdf linked data.

This package is compatible with LinkedData.Center SDaaS architecture

It provides:

Libraries usage

The goal of the libraries is to simplify the conversion of raw data (e.g. .csv or xml file) in RDF. There are tons of tools to do this job and this is yet another. The idea is just to use PHP to do trivial data conversion instead to build and configure complex tool.

With BOTK you define simple models to describe things with a plain set of properties ( e.g a Business Entity, a contact, a product). Then a FactFactory processor cleans data and translates attributes in a RDF graph according with BOTK language profile. More or less this is what you have to do do when process csv or excel files row by row.

With BOTK libraries it is easy to create "gateways" ie processors that get in stdin a data stream producing in sdout a RDF turtle stream

For example this code snippet:

processes this csv dataset:

 id,url,name,aka 
 1,http://linkeddata.center/,LinkedData.Center,LDC
 2,https://github.org/,GitHub,

and produces something similar to this RDF turtle file:

@prefix schema: <http://schema.org/> .

<urn:yp:registry:1> 
    schema:alternateName "LDC","LinkedData.Center" ;
    schema:url <http://linkeddata.center/> .

<urn:yp:registry:2> 
    schema:alternateName "GitHub" ;
    schema:url <https://github.org/> .

The the dataset processing is driven by the SimpleCsvGateway class that uses a set of options that you can override:

SimpleCsvGateway option default note
missingFactsIsError true if a missing fact should considered an error
bufferSize 2000
skippFirstLine true
fieldDelimiter ','
factsProfile array ... see below

factsProfile are processed by FactsFactory class that uses following options:

factsProfile option default note
model LocalBusiness if no namespace specified BOTK\Model is used
modelOptions array ... see below
entityThreshold 100 in numbers of entity that trigger error resilence computation
resilienceToErrors 0.3 if more than 30% of error throws a TooManyErrorException
resilienceToInsanes 0.9 if more than 90% of unacceptable data throws a TooManyErrorException
source 'http://example.com/' the dataset source url
datamapper function YOU must provide at least this function
dataCleaner function a function to clean fields, by default removes ampty fields
factsErrorDetector function a function that detects logical errors in facts, by default reurne false (i.e. error) if no rdf triples generated
rawdataSanitizer function a function that pre-validate raw data before processing, can be used as a filter

modelOptions override the default field options provided by the selected model in the $DEFAULT_OPTIONS variable. For example see this code snippet extracted from LocalBusiness model

Configuring models Options you can force field clenacing and validation.

a field definition drives the process of data cleansing and rdf generation that is provided by model implementation. Note that not always a field generate just a RDF triple: sometime the rdf generation processing requires to create blank nodes or to reference named node. For named node generation the 'base' uri namespace is normally used ("urn:local:." by default)

See more examples here.

Contributing to this project

See Contributing guidelines

License

Copyright © 2018-2021 by LinkedData.Center®

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


All versions of core with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package botk/core contains the following files

Loading the files please wait ....