wang-h / fmdl Goto Github PK
View Code? Open in Web Editor NEWUnsupervised Word Segmentation using Minimum Description Length for Neural Machine Translation (NMT)
License: Apache License 2.0
Unsupervised Word Segmentation using Minimum Description Length for Neural Machine Translation (NMT)
License: Apache License 2.0
Hello there,
I've tested the code to segment protein aminoacid sequences (it's similar to chinese language rules).
When I run the code, it gave letter by letter segmentation of the sequences,
Is the code still under development, or is there any limitations regarding input sequences,
Appreciate any help, thanks !
I have a large training file with 1252976 lines. When I use it to train a model(vocab_size: 30000), it raised an error like following:
Building pair statistics: 2116233it [00:03, 614115.37it/s]
Commit to codebook: 8% 688/8761 [00:00<00:10, 753.77it/s]
Traceback (most recent call last):
File "learn_mdl.py", line 202, in <module>
main(args)
File "learn_mdl.py", line 161, in main
codebook = trainer(args.iterations, args.verbose)
File "learn_mdl.py", line 150, in train
if not self.update_codebook(candidates):
File "learn_mdl.py", line 129, in update_codebook
if self.commit_and_success(pair, total, cost):
File "learn_mdl.py", line 106, in commit_and_success
if sum(self.compute_cost(w1, w2, total)) > 0:
File "learn_mdl.py", line 63, in compute_cost
float(total), float(c1), float(c2), self.data_len)
File "learn_mdl.py", line 68, in compute_data_cost
data_cost += c1 * math.log(c1 / n)
ValueError: math domain error
How can I fix it? Thanks in advance
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.