Java String Remove removeGender(String pos)

Here you can find the source of removeGender(String pos)

Description

remove Gender

License

Apache License

Declaration

public static String removeGender(String pos) 

Method Source Code


//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;
    }
}

Related

  1. removeEscape(String s_)
  2. removeExtraSpacesAndSpecialCharacters(String toSearch, boolean setAllToLowerCase)
  3. removeField(BSONObject b, String fieldName)
  4. removeFillers(String str)
  5. removeFromSearchPath(String _path)
  6. removeGenericQuote(String str)
  7. removeIllegalXMLChars(String in)
  8. removeImportClass(String className)
  9. removeKeyPrefix(Properties properties, String prefix)