Here you can find the source of shortenTagString(String longTag)
Parameter | Description |
---|---|
longTag | a parameter |
public static String shortenTagString(String longTag)
//package com.java2s; //License from project: Open Source License public class Main { /**// w w w . jav a2 s . co m * return short (single letter) form of the tag, covers only nouns, verbs, adjectives, and adverbs * @param longTag * @return */ public static String shortenTagString(String longTag) { longTag = longTag.toLowerCase(); if (longTag.startsWith("n")) return "n"; else if (longTag.startsWith("v")) return "v"; else if (longTag.startsWith("adj") || longTag.startsWith("j")) return "a"; else if (longTag.startsWith("adv") || longTag.startsWith("r")) return "r"; else return null; } }