Here you can find the source of removeGender(String pos)
public static String removeGender(String pos)
//package com.java2s; //License from project: Apache License import java.util.Arrays; public class Main { public static String removeGender(String pos) { if (pos.startsWith("art")) { pos = "art"; } else if ("nm".equals(pos) || "nf".equals(pos) || "nn".equals(pos)) { pos = "n"; }/* w ww. j a v a2s . co m*/ return pos; } public static String[] removeGender(String[] pos) { if (pos == null) return null; String[] copy = Arrays.copyOf(pos, pos.length); for (int i = 0; i < copy.length; i++) { copy[i] = removeGender(copy[i]); } return copy; } }