ua-parser / uap-core

The regex file necessary to build language ports of Browserscope's user agent parser.
Other
743 stars 450 forks source link

Device Type Project - recommended/supported tool #74

Open mrjgreen opened 9 years ago

mrjgreen commented 9 years ago

The question of adding a "device_type" field comes up on a regular basis, but as @elsigh points out in #31 and #65 the ua-parser project is not the right place to make decisions on what is and isn't a phone/tv/tablet/refrigerator etc... Currently I am applying a set of basic rules to the output from the ua-parser to determine the device type (desktop/phone/tablet/other) but due to the simplicity of the approach it's not very accurate. A more complex solution would be difficult to keep up to date without community collaboration.

So - I wondered how people would feel about a side-project within the ua-parser organization to offer a device classification solution, or maybe to begin with a page to point people in the direction of some maintained projects that do this?

@commenthol has done a lot of awesome work on the https://github.com/commenthol/ua-parser-caps project which meets this requirement, plus a lot more - maybe that would be a good place to start for anybody looking to classify devices. As far as I can tell the project currently has only a JavaScript implementation, but is based on a regex ruleset that could be read by any library.

Does anybody have any thoughts on whether this is a good use of time, or is device classification a challenge that we really don't want to try to tackle?

shashank- commented 7 years ago

@mrjgreen

Are you still looking to do this? Any progress? If so we are looking to start this internally as well to classify devices further into bigger buckets (phone, tablet, desktop, etc...).

nielsbasjes commented 7 years ago

Have a look at my project (and tell me what you think) which does include such a classification: https://github.com/nielsbasjes/yauaa

commenthol commented 7 years ago

@nielsbasjes & yauaa - cool project, well done.