TRF Language Model
main-word-cluster.cpp File Reference

[main] More...

#include "wb-word-cluster.h"
#include <omp.h>

Go to the source code of this file.

Functions

opt Add (wbOPT_INT, "num", &cfg_nClassNum, "class num")
 
opt Add (wbOPT_STRING, "read", &cfg_pathReadRes, "read the res file [word-id, class-id]")
 
opt Add (wbOPT_STRING, "write", &cfg_pathWriteRes, "write the res file [word-id, class-id]")
 
opt Add (wbOPT_INT, "thread", &cfg_nThread, "thread number")
 
opt Add (wbOPT_TRUE, "simple-cluster", &cfg_bSimpleCluster, "just using the count of unigram to perform cluster")
 
opt Parse (_argc, _argv)
 
 if (cfg_nThread > 0) omp_set_num_threads(cfg_nThread)
 

Variables

Option opt
 
 _wbMain
 

Detailed Description

[main]

Author
wangbin
Date
2014-03-24

Definition in file main-word-cluster.cpp.

Function Documentation

§ Add() [1/5]

opt Add ( wbOPT_INT  ,
"num"  ,
cfg_nClassNum,
"class num"   
)

§ Add() [2/5]

opt Add ( wbOPT_STRING  ,
"read"  ,
cfg_pathReadRes,
"read the res file "  [word-id, class-id] 
)

§ Add() [3/5]

opt Add ( wbOPT_STRING  ,
"write"  ,
cfg_pathWriteRes,
"write the res file "  [word-id, class-id] 
)

§ Add() [4/5]

opt Add ( wbOPT_INT  ,
"thread"  ,
cfg_nThread,
"thread number"   
)

§ Add() [5/5]

opt Add ( wbOPT_TRUE  ,
"simple-cluster"  ,
cfg_bSimpleCluster,
"just using the count of unigram to perform cluster"   
)

§ if()

if ( cfg_nThread  ,
 
)

§ Parse()

opt Parse ( _argc  ,
_argv   
)

Variable Documentation

§ _wbMain

_wbMain
Initial value:
{
opt.Add(wbOPT_STRING, "txt", &cfg_pathTxt, "input txt(word id, begin from 0)")
Option opt
void Add(ValueType t, const char *pLabel, void *pAddress, const char *pDocMsg=NULL)
Add a option.
Definition: wb-option.cpp:35

Definition at line 50 of file main-word-cluster.cpp.

§ opt

Option opt

Definition at line 47 of file main-word-cluster.cpp.