Coder Social home page Coder Social logo

chqiwang / convseg Goto Github PK

View Code? Open in Web Editor NEW
141.0 141.0 53.0 39 KB

Convolutional neural network and word embeddings for Chinese word segmentation

Home Page: https://arxiv.org/abs/1711.04411

License: MIT License

Python 83.21% Perl 13.33% Shell 3.46%

convseg's People

Contributors

chqiwang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

convseg's Issues

参数问题

请问那个train.py里面的TASK参数应该写什么呢?我看参数定义里面没有写默认值。谢谢!

meet some problem in train.py

When i run the code train.py
1

Problem:
TASK = import("args")
AttributeError: module 'args' has no attribute 'read_train_file'

IOError: [Errno 2] No such file or directory: 'model-wemb-msr/logs/dev/1.temp'

When I use word ebedding(word_window==4), I encountered this error :

Traceback (most recent call last):
File "train.py", line 91, in
max_epoches=args.max_epoches)
File "/home/czy/Pycode/MasterPaper/code/convseg-master/tagger.py", line 440, in train
log_dir + '/dev', epoch)
File "/home/czy/Pycode/MasterPaper/code/convseg-master/cws.py", line 181, in evaluator
eval_lines = [l.rstrip() for l in codecs.open(temp_path, 'r', 'utf8')]
File "/home/czy/env/.virtualenvs/keras/lib/python2.7/codecs.py", line 896, in open
file = builtin.open(filename, mode, buffering)
IOError: [Errno 2] No such file or directory: 'model-wemb-msr/logs/dev/1.temp'

Can you tell me how to solve this problem? Thanks!

Question about Batch Normalization?

Thanks for your code. But I have a question about the implementation af Batch Normalization.

if use_bn: w = layers.batch_norm(inputs=v, decay=0.9, is_training=is_train, center=True, scale=True, scope='BatchNorm_w_%d' % i) v = layers.batch_norm(inputs=w, decay=0.9, is_training=is_train, center=True, scale=True, scope='BatchNorm_v_%d' % i)
Where w is computed by the inputs=v and v is computed by the inputs=w. Is there a mistake? The correct code I think is
if use_bn: w = layers.batch_norm(inputs=w, decay=0.9, is_training=is_train, center=True, scale=True, scope='BatchNorm_w_%d' % i) v = layers.batch_norm(inputs=v, decay=0.9, is_training=is_train, center=True, scale=True, scope='BatchNorm_v_%d' % i)
Is it true?

Any optimization at the neg_log_likelihood computation?

Thanks for your brilliant job.

I am currently looking at building it on my own with pytorch.

Sorry that I am relatively new to NLP and thereby (maybe) immature on some issue. When the loss function looks like computationally expensive. Like, if I have a 28-char sentence and apply 4 tags as yours in the paper. I would definitely have 4^28 = 72057594037927936 results to take in. Is it really so expensive? Or there might be some form of optimization to avoid the daunting overhead?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.