{"id":21291532,"url":"https://github.com/smartdataanalytics/beast","last_synced_at":"2025-03-15T16:34:10.533Z","repository":{"id":57738359,"uuid":"76848869","full_name":"SmartDataAnalytics/Beast","owner":"SmartDataAnalytics","description":"Benchmarking, Evaluation, and Analysis Stack - A powerful yet lightweight Java8/Jena-based RDF processing stack.","archived":false,"fork":false,"pushed_at":"2018-06-20T15:09:10.000Z","size":333,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":27,"default_branch":"master","last_synced_at":"2025-01-22T06:22:36.630Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SmartDataAnalytics.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-19T09:42:31.000Z","updated_at":"2024-02-12T13:27:24.000Z","dependencies_parsed_at":"2022-08-25T02:20:41.068Z","dependency_job_id":null,"html_url":"https://github.com/SmartDataAnalytics/Beast","commit_stats":null,"previous_names":["aksw/beast"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SmartDataAnalytics%2FBeast","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SmartDataAnalytics%2FBeast/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SmartDataAnalytics%2FBeast/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SmartDataAnalytics%2FBeast/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SmartDataAnalytics","download_url":"https://codeload.github.com/SmartDataAnalytics/Beast/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243760429,"owners_count":20343630,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-21T13:35:00.459Z","updated_at":"2025-03-15T16:34:10.511Z","avatar_url":"https://github.com/SmartDataAnalytics.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BEAST - Benchmarking, Evaluation, and Analysis Stack\n\nBeast is a lightweight framework that makes it easy to build RDF-in/RDF-out workflows using Java8 streams and Jena.\nFor instance, if you want to execute a set of tasks described in RDF, Beast easily lets you create workflows that execute them as often as desired and record \nany measurements directly in  RDF using the vocabulary of your choice (such as DataCube).\n\n## Charts in RDF - the Chart Vocabulary\n\nThe chart vocabulary enables embedding information about which charts to render from a dataset directly in RDF.\nThe full dataset example is [here](beast-core/src/test/resources/statistical-data.ttl).\n\n```turtle\neg:exp1\n  a cv:StatisticalBarChart ;\n  rdfs:label \"Performance Histogram\" ;\n  cv:xAxisTitle \"Workload\" ;\n  cv:yAxisTitle \"Time (s)\" ;\n  cv:width 1650 ;\n  cv:height 1050 ;\n  cv:style eg:exp1-style ;\n  cv:series eg:exp1-series ;\n  .\n\neg:exp1-style\n  a cv:ChartStyle ;\n  cv:legendPosition \"InsideNW\" ;\n  cv:yAxisLogarithmic true ;\n  cv:yAxisTicksVisible true ;\n  cv:xAxisLabelRotation 45 ;\n  cv:yAxisDecimalPattern \"###,###,###,###,###.#####\" ;\n  .\n        \neg:exp1-series \n  a cv:ConceptBasedSeries ;\n  cv:sliceProperty bsbm:experimentId ;\n  cv:series \"some-triple-store\" ;\n  cv:valueProperty \u003chttp://bsbm.org/avgQet\u003e ;\n  bsbm:experimentId eg:bsbm-exp1 ;\n  .\n```\n\nCharts can be rendered using the class [`org.aksw.beast.cli.MainBeastChart`](beast-cli/src/main/java/org/aksw/beast/cli/MainBeastChart.java).\nInstalling the beast debian package gives you the convenient `ldcharts` command, which invokes the main class for rendering charts.\n\n```bash\ncd beast-core/src/test/resources\nldcharts statistical-data.ttl\n```\n\n\n```bash\nUsage [Options] file(s)\n\nOption                 Description\n------                 -----------\n--png                  Output charts in png format (Default if no other format is given)\n--svg                  Output charts in svg format\n--jgp                  Output charts in jpg format\n--gui                  Display charts in a window\n-o, --output \u003cString\u003e  Output folder\n```\n\n![LDChartScreenshot](docs/images/2018-02-10-ldchart-screenshot.png)\n\n\n## Features\n\n* Construction of Resource-centric Java streams. Hence, plain RDF properties can be attached to resources as part of the stream execution.\n* Extension to Jena which enhances Resources with support for attaching and retrieving Java objects by class. This means you can e.g. attach a parsed Jena Query object to a resource that represents a SPARQL query string.\n* Looping with the loops state getting attached to the resource.\n* No need to know the URI for resources in advance. You can painlessly give them a proper name *at the end* of the workflow *based on its properties*.\n\nWhile technically Beast essentially provides utilities for chaining functions and streams, a great share of Beast's contribution lies in its the conceptual considerations.\n\n## Components\n\n* Jena Extension: Attach Java objects to Jena resources by casting them to the enhanced resource `ResourceEnh`. Requires the `Model` to be created with `ModelFactoryEnh`:\n```java\nModel m = ModelFactoryEnh.createModel();\nm.createResource().as(ResourceEnh.class)\n    .addTrait(myObj.getClass(), myObj);\n    // Short-hand of above version\n    .addTrait(myObj);\n```\n* RdfStream API: Enables construction of RDF Resource based workflows using the usual streaming methods, such as *map*, *flatMap*, *peek*, and additional ones such as *repeat*.\n* Analysis: Compute new resources representing observations of aggregated values such as averages and standard deviations.\n* Visualization: Plot series as charts.\n\n```java\nRdfStream\n    .startWithCopy()\n    .peek(workloadRes -\u003e workloadRes.as(ResourceEnh.class)\n        .addTrait(QueryFactory.create(workloadRes.getProperty(LSQ.text).getString())))\n    .map(workloadRes -\u003e\n        // Create the blank observation resource\n        workloadRes.getModel().createResource().as(ResourceEnh.class)\n        // Copy the query object attached to the workload resource over to this observation resource\n        .copyTraitsFrom(workloadRes)\n        // Add some properties to the observation\n        .addProperty(RDF.type, QB.Observation)\n        .addProperty(IguanaVocab.workload, workloadRes)\n        .as(ResourceEnh.class))\n    .seq(\n        // Warm up run - the resources are processed, but filtered out\n        RdfStream.\u003cResourceEnh\u003estart().repeat(1, IV.run, 1)\n            .peek(r -\u003e r.addLiteral(IV.warmup, true))\n            .filter(r -\u003e false),\n        // Actual evaluation\n        RdfStream.\u003cResourceEnh\u003estart().repeat(3, IV.run, 1).peek(r -\u003e r.addLiteral(IV.warmup, false))\n    )\n    // Give the observation resource a proper name\n    .map(r -\u003e r.rename(\"http://example.org/observation/{0}-{1}\", r.getProperty(IguanaVocab.workload).getResource().getLocalName(), IV.run))\n    .apply(() -\u003e workloads.stream()).get()\n    // write out every observation resource\n    .forEach(observationRes -\u003e RDFDataMgr.write(System.out, observationRes.getModel(), RDFFormat.TURTLE_BLOCKS));\n    ;\n```\n\nWhich generates output such as:\n```java\n\u003chttp://example.org/observation/q1a-5\u003e\n        \u003chttp://www.w3.org/1999/02/22-rdf-syntax-ns#type\u003e  \u003chttp://purl.org/linked-data/cube#Observation\u003e ;\n        \u003chttp://iguana.aksw.org/ontology#workload\u003e  \u003chttp://example.org/query/q1a\u003e ;\n        \u003chttp://www.w3.org/ns/prov#startedAtTime\u003e  \"2016-12-20T02:57:07.608Z\"^^\u003chttp://www.w3.org/2001/XMLSchema#dateTime\u003e ;\n        \u003chttp://www.w3.org/ns/prov#endAtTime\u003e  \"2016-12-20T02:57:07.672Z\"^^\u003chttp://www.w3.org/2001/XMLSchema#dateTime\u003e ;\n        \u003chttp://www.w3.org/2006/time#numericDuration\u003e  \"0.063747601\"^^\u003chttp://www.w3.org/2001/XMLSchema#double\u003e ;\n        \u003chttp://iv.aksw.org/vocab#run\u003e  \"5\"^^\u003chttp://www.w3.org/2001/XMLSchema#long\u003e ;\n        \u003chttp://iv.aksw.org/vocab#warmup\u003e  false .\n```\n\n## Examples\n\n* [Performance Measurement](beast-examples/src/main/java/org/aksw/beast/examples/MainQueryPerformance.java) - [Test Data (queries.ttl)](beast-examples/src/main/resources/queries.ttl)\n* [KFoldCrossValidation](beast-examples/src/main/java/org/aksw/beast/examples/MainKFoldCrossValidation.java) - [Test Data (folds.ttl)](beast-examples/src/main/resources/folds.ttl)\n\n\n## Dependencies\n\nBeast only aggregates features from other (lower-level) projects, among them:\n\nCore:\n* jena\n* guava\n\nVisualization (Optional):\n* JFreeChart\n* XChart (probably in the future)\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmartdataanalytics%2Fbeast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmartdataanalytics%2Fbeast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmartdataanalytics%2Fbeast/lists"}