Package org.apache.devicemap

Examples of org.apache.devicemap.DeviceMapClient.classify()


        String test = "Mozilla/5.0 (Linux; U; Android 2.2; en; HTC Aria A6380 Build/ERE27) AppleWebKit/540.13+ (KHTML, like Gecko) Version/3.1 Mobile Safari/524.15.0";

        long startn = System.nanoTime();

        Map<String, String> m = client.classify(test);

        long diffn = (System.nanoTime() - startn) / 1000;

        System.out.println("Test lookup: '" + m.get("id") + "' time: " + diffn + "usec");
View Full Code Here


            while ((line = in.readLine()) != null) {
                System.out.println("Text: '" + line + "'");

                startn = System.nanoTime();

                m = client.classify(line);

                diffn = System.nanoTime() - startn;

                total += diffn;
                count++;
View Full Code Here

        } else {
            System.out.println("Text: '" + parameter + "'");

            startn = System.nanoTime();

            m = client.classify(parameter);

            diffn = System.nanoTime() - startn;

            System.out.println("Text lookup: '" + m.get("id") + "' time: " + (diffn / 1000) + "usec");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.