Provides an example of processing a YAML file containing evidence for device detection.
There are 20,000 examples in the supplied file of evidence representing HTTP Headers. For example:
header.user-agent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36'
header.sec-ch-ua: '" Not A;Brand";v="99", "Chromium";v="98", "Google Chrome";v="98"'
header.sec-ch-ua-full-version: '"98.0.4758.87"'
header.sec-ch-ua-mobile: '?0'
header.sec-ch-ua-platform: '"Android"'
We create a device detection pipeline to read the data and find out about the associated devices, we write this data to a YAML formatted output stream.
As well as explaining the basic operation of offline processing using the defaults, for advanced operation this example can be used to experiment with tuning device detection for performance and predictive power using Performance Profile, Graph and Difference and Drift settings.
| void fiftyone.devicedetection.examples.console.OfflineProcessing.run |
( |
String | dataFile, |
|
|
InputStream | is, |
|
|
OutputStream | os ) throws Exception |
|
static |
Process a YAML representation of evidence - and create a YAML output containing the processed evidence.
- Parameters
-
| dataFile | the 51Degrees on premise data file containing information about devices |
| is | an InputStream containing YAML documents - one per device |
| os | an OutputStream for the processed data |
- Examples
- console/OfflineProcessing.java.