outlier_function.toml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. group = "Service"
  2. name = "Outlier Function"
  3. prefix = '''
  4. PREFIX dtf: <https://ontology.rys.app/dt/function/>
  5. PREFIX owl: <http://www.w3.org/2002/07/owl#>
  6. PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
  7. PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
  8. PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
  9. '''
  10. query = '''
  11. SELECT ?outlier ?outlier_relation ?outlier_value WHERE {
  12. SERVICE <{{ service_endpoint }}> {
  13. SELECT ?outlier ?outlier_relation ?outlier_value WHERE {
  14. BIND(dtf:outlier("{{ outlier_file }}", "{{ outlier_column }}", "{{ outlier_artifact }}") AS ?outlier)
  15. }
  16. }
  17. }
  18. '''
  19. query_with_filter = '''
  20. SELECT ?outlier ?outlier_relation ?outlier_value WHERE {
  21. SERVICE <{{ service_endpoint }}> {
  22. SELECT ?outlier ?outlier_relation ?outlier_value WHERE {
  23. BIND(dtf:outlier("{{ outlier_file }}", "{{ outlier_column }}", "{{ outlier_artifact }}") AS ?outlier) .
  24. FILTER (?outlier_relation IN (tabular:holdsContent, tabular:hasRowPosition))
  25. }
  26. }
  27. }
  28. '''
  29. description = "Find an outlier in a tabular format."
  30. visual_support = true
  31. [[replacements]]
  32. placeholder = 'service_endpoint'
  33. suggestion = 'http://127.0.0.1:8000/'
  34. description = 'Which service do you want to use?'
  35. [[replacements]]
  36. placeholder = 'outlier_file'
  37. suggestion = 'rotation.csv'
  38. description = 'In which file is the outlier located?'
  39. [[replacements]]
  40. placeholder = 'outlier_column'
  41. suggestion = '2'
  42. description = 'In which column?'
  43. [[replacements]]
  44. placeholder = 'outlier_artifact'
  45. suggestion = '<http://ua.be/drivetrain/description/artifacts/artifacts#drivetrain-sensor-data-v1>'
  46. description = 'In which artifact?'