Comments (3)
Hi,
I have no experience for implementing text classificiation models. If you want to implement the code by yourself, I have following suggestions:
- text_classification_model.py is the code for implementing text classification model from flair.
- At line 82-84, the code extracts document embeddings instead of word embeddings for the model. Therefore, you may need to decide which part of embedding represents the text embedding. For example, the representation of
[CLS]
is used by BERT for text classification. Some of the embeddings like Flair embeddings is difficult to decide text embeddings. It could be easier using the pooled/mean embeddings over tokens. You can find the implementation at embeddings.py. But personally I suggest you just implement the function at the forward function at text_classification_model.py. - In general, I suggest you may follow the embedding selection function at sequence_tagger_model.py to implement ACE attext_classification_model.py. Then just calculate pooled/mean embeddings over the selected embedding candidates as the text representation for the
sentence_tensor
.
Best.
from ace.
Thanks @wangxinyu0922
I'll have a look at it and see how it goes.
Regards
Raj
from ace.
Close this issue since Xinyu's comment seems to resolve the OP question.
from ace.
Related Issues (20)
- Requirements.txt versions HOT 3
- Confuse about the SDP dataset HOT 2
- Is GPU required? HOT 4
- AttributeError: 'NoneType' object has no attribute 'tokenize' HOT 7
- Test result comparison without vs with document-level features HOT 18
- Embeddings Availability HOT 3
- Testing on my own data file HOT 1
- Using your best model for inference for NER in production HOT 4
- Missing B-ORG but with I-ORG and E-ORG HOT 2
- Test PTB Dependency Parsing Model HOT 9
- How to apply ACE model as a parser tool for DM parsing? HOT 3
- Change the directory of downloading HOT 1
- How many embeds are connected? HOT 4
- ERROR: No matching distribution found for nltk==7.1.2 HOT 3
- bdb.BdbQuit error while training conll 2003 HOT 1
- Error when loading custom dataset HOT 5
- Memory requirements for a new model HOT 3
- Segmentation Fault (core dumped) HOT 3
- Install fails all python versions tested 3.6 3.7 3.8 3.9 3.10 3.11. Repo Unusable.
- can you share the weight for semantic dependency parsing?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ace.