Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a list of values? #31

Closed
choeflake opened this issue Mar 2, 2017 · 6 comments
Closed

Is there a list of values? #31

choeflake opened this issue Mar 2, 2017 · 6 comments

Comments

@choeflake
Copy link

Hi,

are there lists of possible values for classes? For example, a list of possible values for Device Class or Operating System Name etc.

@nielsbasjes
Copy link
Owner

For the DeviceClass it is already documented in https://github.com/nielsbasjes/yauaa/blob/master/README.md .
For the other fields I'll check what is possible.

@nielsbasjes
Copy link
Owner

I had a look at the values in the testcases in the project
cat analyzer/src/main/resources/UserAgents/*yaml | fgrep ' :' | grep -v '[0-9] *:' | fgrep -v '#' | sort | uniq -c
and based on that I added a bit more documentation to the README.md

Please indicate if this is what you were looking for.

@nielsbasjes
Copy link
Owner

I'm closing this because from my perspective this is these are the lists where I actually can provide a complete list of values.

@choeflake
Copy link
Author

Thanks! The the following (extended version of @nielsbasjes command) command prints available values for other properties like Operating System Name, or what you want.
cat src/main/resources/UserAgents/*yaml | fgrep ' :' | grep -v '[0-9] *:' | fgrep -v '#' | sort | uniq | sed 's/\s\s//g' | sed 's/\s:/:/g' | egrep 'AgentClass:|AgentName:|DeviceBrand:|DeviceClass:|LayoutEngineName:|OperatingSystemClass:OperatingSystemName:'

@dinikolop
Copy link

Hi @nielsbasjes ! Very useful bash command.
Is there a way to get a list of possible values for a specified field directly from the library in Java?

@nielsbasjes
Copy link
Owner

nielsbasjes commented Dec 15, 2020

No, there isn't such a command in the library itself.
The main reason is that most fields are extracted values from the useragents. So what you put in is what comes out.
Only for a few specific "high level" fields would this make sense and those seem covered by the mentioned bash command and the documentation https://yauaa.basjes.nl/README-Output.html .

In addition: I see that the mentioned bash command for the most part only provides the values for which I have included testcases. Some of those testcases are hand crafted (i.e. "fake cases"!) by me to ensure the analyzer behaves correctly even in cases I do not have real examples for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants