-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#1. Support model vector quantization. Model size will be reduce to 1…
…/4 size of orginial model #2. Remove NO_SUPPORT_PARALLEL_LIB tag #3. Change L-BFGS history parameter array type from double to FixedBigArray in order to support larger feature size
- Loading branch information
1 parent
e0fbe8a
commit f329ca1
Showing
22 changed files
with
233 additions
and
791 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using AdvUtils; | ||
|
||
namespace CRFSharpConsole | ||
{ | ||
|
@@ -10,14 +8,15 @@ class Program | |
static void Usage() | ||
{ | ||
Console.WriteLine("Linear-chain CRF encoder & decoder by Zhongkai Fu ([email protected])"); | ||
Console.WriteLine("CRFSharpConsole [parameter list...]"); | ||
Console.WriteLine(" -encode [parameter list...] - Encode CRF model from given training corpus"); | ||
Console.WriteLine(" -decode [parameter list...] - Decode CRF model to label text"); | ||
Console.WriteLine(" -shrink [parameter list...] - Shrink encoded CRF model"); | ||
Console.WriteLine("CRFSharpConsole.exe [parameters list...]"); | ||
Console.WriteLine(" -encode [parameters list...] - Encode CRF model from training corpus"); | ||
Console.WriteLine(" -decode [parameters list...] - Decode CRF model on test corpus"); | ||
} | ||
|
||
static void Main(string[] args) | ||
{ | ||
Logger.LogFile = "CRFSharpConsole.log"; | ||
|
||
if (args.Length < 1) | ||
{ | ||
Usage(); | ||
|
@@ -26,7 +25,6 @@ static void Main(string[] args) | |
|
||
var bEncoder = false; | ||
var bDecoder = false; | ||
var bShrink = false; | ||
|
||
for (int index = 0; index < args.Length; index++) | ||
{ | ||
|
@@ -50,21 +48,15 @@ static void Main(string[] args) | |
{ | ||
bDecoder = true; | ||
} | ||
if (strType == "shrink") | ||
{ | ||
bShrink = true; | ||
} | ||
} | ||
|
||
//Invalidated parameter | ||
if (bEncoder == false && bDecoder == false && bShrink == false) | ||
if (bEncoder == false && bDecoder == false) | ||
{ | ||
Usage(); | ||
return; | ||
} | ||
|
||
//try | ||
//{ | ||
if (bEncoder == true) | ||
{ | ||
var encoderConsole = new EncoderConsole(); | ||
|
@@ -75,31 +67,10 @@ static void Main(string[] args) | |
var decoderConsole = new DecoderConsole(); | ||
decoderConsole.Run(args); | ||
} | ||
else if (bShrink == true) | ||
{ | ||
var shrinkConsole = new ShrinkConsole(); | ||
shrinkConsole.Run(args); | ||
} | ||
else | ||
{ | ||
Usage(); | ||
} | ||
// } | ||
//catch (System.AggregateException err) | ||
//{ | ||
// Console.WriteLine("Error Message : {0}", err.Message); | ||
// Console.WriteLine("Call stack : {0}", err.StackTrace); | ||
// Console.WriteLine("Inner Exception : {0}", err.InnerException); | ||
// foreach (Exception exp in err.InnerExceptions) | ||
// { | ||
// Console.WriteLine("Inner Exception in Collect: {0}", exp); | ||
// } | ||
//} | ||
//catch (System.Exception err) | ||
//{ | ||
// Console.WriteLine("Error Message : {0}", err.Message); | ||
// Console.WriteLine("Call stack : {0}", err.StackTrace); | ||
//} | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.