Code Monkey home page Code Monkey logo

s-lstm's Introduction

Code for the paper: Sentence-State LSTM for Text Representation. This package consists of the code for both classification and sequence labelling. README files are included in each individual subfolder.

Cite

@article{zhang2018slstm,
title={Sentence-State LSTM for Text Representation},
author={Zhang, Yue and Liu, Qi and Song, Linfeng},
booktitle={Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (ACL)}, year={2018}
}

s-lstm's People

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

s-lstm's Issues

分类 输入问题

s-lstm 应该是对数据集进行分句处理,然后输入模型的吧,我看代码数据集预处理没有对句子进行分割,请作者帮我解惑

question about the equations

Hi~

I noticed in your equation (2) you applied softmax for these gates before building the new cell state, i, l, r, f, s = softmax(i, l, r, f, s). but I can not figure out why you need a softmax, I think you have already activated them by using sigmoid why you need another softmax. to normalize them? or for performance?

python build_data.py报错

请问要跑这份代码需要什么样的环境呢,我已经pip install datetime但是在运行python build_data.py时仍然报错Traceback (most recent call last):
File "/public/home/yaoshsh/anaconda3/envs/recon/lib/python3.8/site-packages/numpy/core/init.py", line 23, in
from . import multiarray
File "/public/home/yaoshsh/anaconda3/envs/recon/lib/python3.8/site-packages/numpy/core/multiarray.py", line 10, in
from . import overrides
File "/public/home/yaoshsh/anaconda3/envs/recon/lib/python3.8/site-packages/numpy/core/overrides.py", line 6, in
from numpy.core._multiarray_umath import (
ImportError: PyCapsule_Import could not import module "datetime"

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "build_data.py", line 1, in
from model.config import Config
File "/public/home/yaoshsh/ai_proj/S-LSTM/sequence_tagging/model/config.py", line 4, in
from .general_utils import get_logger
File "/public/home/yaoshsh/ai_proj/S-LSTM/sequence_tagging/model/general_utils.py", line 4, in
import numpy as np
File "/public/home/yaoshsh/anaconda3/envs/recon/lib/python3.8/site-packages/numpy/init.py", line 141, in
from . import core
File "/public/home/yaoshsh/anaconda3/envs/recon/lib/python3.8/site-packages/numpy/core/init.py", line 49, in
raise ImportError(msg)
ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

  • The Python version is: Python3.8 from "/public/home/yaoshsh/anaconda3/envs/recon/bin/python"
  • The NumPy version is: "1.24.4"

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: PyCapsule_Import could not import module "datetime"

Segmentation fault
望解答

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.