Code example for Splitter

Methods: split

0
                            private final Splitter onTabs = Splitter.on("\t"); 
 
                            public boolean processLine(String s) throws IOException { 
                                if (!s.startsWith("#")) { 
                                    if (!header) { 
                                        Iterator<String> fields = onTabs.split(s).iterator(); 
                                        fields.next(); 
                                        String word = fields.next(); 
                                        words.add(word); 
                                        int count = (int) Math.rint(Double.parseDouble(fields.next())); 
                                        baseWeights.put(word, count); 
                                    } else { 
                                        header = false; 
                                    } 
                                } 
                                return true; 
                            } 
 
                            public Object getResult() { 
                                return null;