翻译词性

@param tag
@return
329187
public static String translate(String tag)
    {
        String cn = translator.get(tag);
        if (cn == null) return tag;
        return cn;
    }
195511
public boolean isInstanceOfTag(Tag tag) {
      return tag != null && getTag().filter(t -> t.isInstance(tag)).isPresent();
   }
1292384
public static Set<String> getTagSet(String tags) {
		tags = StringUtils.substringBefore(tags, "\n");
		String[] tagArr = tags.split("[\\s,，;；]");
		Set<String> tagSet = new HashSet<String>();
		for (int i = 0; i < tagArr.length; i++) {
			String tag = tagArr[i].trim();
			if (!tag.isEmpty()) {
				tagSet.add(tag);
			}
		}
		return tagSet;
	}
803281
@SuppressWarnings("unchecked")
  public <T extends Tag> T getTag(Class<T> tagClass) {
    List<T> matches = getTags(tagClass);
    T matchingTag = null;
    if (matches.size() > 0) {
      matchingTag = matches.get(0);
    }
//    if (matches.size() >= 2) {
//      throw new IllegalStateException("Multiple identical tags found (" + matches + ")");
//    }
//    else if (matches.size() == 1) {
//      matchingTag = matches.get(0);
//    }
    return matchingTag;
  }
1251220
public TagResult withTags(java.util.Map<String, String> tags) {
        setTags(tags);
        return this;
    }
371289
private void writeTagPayload(Tag<?> tag) throws IOException {
        switch (tag.getType()) {
            case TAG_END:
                writeEndTagPayload((EndTag) tag);
                break;

            case TAG_BYTE:
                writeByteTagPayload((ByteTag) tag);
                break;

            case TAG_SHORT:
                writeShortTagPayload((ShortTag) tag);
                break;

            case TAG_INT:
                writeIntTagPayload((IntTag) tag);
                break;

            case TAG_LONG:
                writeLongTagPayload((LongTag) tag);
                break;

            case TAG_FLOAT:
                writeFloatTagPayload((FloatTag) tag);
                break;

            case TAG_DOUBLE:
                writeDoubleTagPayload((DoubleTag) tag);
                break;

            case TAG_BYTE_ARRAY:
                writeByteArrayTagPayload((ByteArrayTag) tag);
                break;

            case TAG_STRING:
                writeStringTagPayload((StringTag) tag);
                break;

            case TAG_LIST:
                writeListTagPayload((ListTag<?>) tag);
                break;

            case TAG_COMPOUND:
                writeCompoundTagPayload((CompoundTag) tag);
                break;

            case TAG_INT_ARRAY:
                writeIntArrayTagPayload((IntArrayTag) tag);
                break;

            case TAG_SHORT_ARRAY:
                writeShortArrayTagPayload((ShortArrayTag) tag);
                break;

            default:
                throw new IOException("Invalid tag type: " + tag.getType() + ".");
        }
    }
1015720
private static Elements getElementsByTag(Element e, String tag) {
        Elements es = e.getElementsByTag(tag);
        es.remove(e);
        return es;
    }
207274
public static String tag(String tag, String... content) {
		return openTag(tag, null, null, content) + closeTag(tag);
	}
961866
public Input withTags(java.util.Map<String, String> tags) {
        setTags(tags);
        return this;
    }
923041
protected static String normaliseTag(String tag) {
        StringBuffer nt = new StringBuffer();
        for(char c : tag.toLowerCase(Locale.ROOT).toCharArray()) {
            if((int)c >= 0x20 && (int)c <= 0x7d &&
                    (int)c != 0x3d) {
                nt.append(c);
            }
        }
        return nt.toString();
    }
356502
public <T extends Tag> T get(String tagName) {
        return (T) this.value.get(tagName);
    }
1206170
public CollectionRequest<Task> findByTag(String tag) {
    
        String path = String.format("/tags/%s/tasks", tag);
        return new CollectionRequest<Task>(this, Task.class, path, "GET");
    }
329345
protected void readTag(int tag)
        throws IOException
    {
        int length = (is.read() << 8) + is.read();
        is.skip(length);
    }
407160
public String get(Object tag) {
    String result = tagToName.get(tag);
    if (result == null) {
      throw new IllegalArgumentException("unknown tag: " + tag);
    }
    return result;
  }
459340
public Set<TagModel> getDescendantTags(TagModel tag)
    {
        Set<TagModel> ancestors = new HashSet<>();
        getDescendantTags(tag, ancestors);
        return ancestors;
    }
36518
public CollectionRequest<Task> getTasksWithTag(String tag) {
    
        String path = String.format("/tags/%s/tasks", tag);
        return new CollectionRequest<Task>(this, Task.class, path, "GET");
    }
919611
protected String getReadElfTag(String tag) {
        String tagValue = null;
        try {
            String result[] = ExecUtil.execute("/usr/bin/readelf -A /proc/self/exe");
            if(result != null){
                for(String line : result) {
                    line = line.trim();
                    if (line.startsWith(tag) && line.contains(":")) {
                        String lineParts[] = line.split(":", 2);
                        if(lineParts.length > 1)
                            tagValue = lineParts[1].trim();
                        break;
                    }
                }
            }
        }
        catch (IOException|InterruptedException ioe) { ioe.printStackTrace(); }
        return tagValue;
    }