这是一款很好用的工具包

源代码在线查看: pfsg-vocab.gawk

软件大小: 3034 K
上传用户: wanghaihah
关键词: 工具包
下载地址: 免注册下载 普通下载 VIP

相关代码

				#!/usr/local/bin/gawk -f				#				# pfsg-vocab --				#	extract vocabulary used in PFSG				#				# usage: pfsg-vocab PFSG-FILE ... > VOCAB				#				# $Header: /home/srilm/devel/utils/src/RCS/pfsg-vocab.gawk,v 1.1 2003/02/18 18:33:04 stolcke Exp $				#								BEGIN {					null = "NULL";				}								$1 == "nodes" {					for (i = 3; i 						if ($i != null) {							is_word[$i] = 1;						}					}					next;				}								$1 == "name" {					# sub-pfsg names are not words, and might have been added during the					# processing of the nodes list					delete is_word[$2];				}								END {					for (word in is_word) {						print word;					}				}											

相关资源