Code Monkey home page Code Monkey logo

cnn-re-tf's Issues

[Help] How do I specify the positive class? How to output the prediction results?

Dear all,

I need help to understand these codes.

I would like to use these codes to make predictions. My data contains two class labels, namely 'Cat' and 'Bunny'. If I would like to pick "Bunny" as positive class, shall I edit the \er\target.txt and setting all instances whose class is "Bunny" as "1 0" and the others (cat) as "0 1"?

Moreover, how can I get the actual predictions?

Thank ahead for your time.

How to prepare the source.att file

Hi there, I am back again. This time I am trying to train a context cnn model using sentence and some other attributes. For example, including sentence itself and demographic attributes of writer (age, income, education level, etc) into a source data entry: "The fox chase a bunny , 23 , 24000 , high school"

I am not quite sure whether I could just added these other attributes as left, right file, correct me if I am wrong:

source.left:
the fox chase a bunny
source.middle:
23,24000
source.right:
high school
target.txt
1 0

BUT how abount source.att? How to decide the values between 0.0 and 1.0?

Dataset format and input format for new predictions

Hi, can you please explain how I can form my own dataset for training MLMICNN. I'm confused with the source.att and target files and some tokens in the other files, such as , , etc.
Also is it possible to check the relation prediction for a single sentence after training is completed ?

Did you optimize F1 specifically

Hi,

I am doing a simliar project as you did.
I took a look at your text_cnn looks like the loss function you use is cross_entrophy.
I wonder how does precision and recall look like when your loss start to converge?
In my case loss start to be very small but Precision and Recall is still high, not sure what need to be done.
Did you optimize F1 specifically?
Thanks!

TypeError: object of type 'NoneType' has no len() with #3 settings

(.venv) ub16hp@UB16HP:/ub16_prj/cnn-re-tf$ python distant_supervision.py
===== step 1 =====
[1/4] Downloading wiki articles ...
===== step 2 =====
[1/4] Downloading wiki articles ...
===== step 3 =====
[1/4] Downloading wiki articles ...
===== step 4 =====
[1/4] Downloading wiki articles ...
===== step 5 =====
[1/4] Downloading wiki articles ...
===== step 6 =====
[1/4] Downloading wiki articles ...
===== step 7 =====
[1/4] Downloading wiki articles ...
Traceback (most recent call last):
File "distant_supervision.py", line 693, in
main()
File "distant_supervision.py", line 681, in main
positive_examples()
File "distant_supervision.py", line 452, in positive_examples
ret = loop(step, doc_id, limit, entities, relations, counter)
File "distant_supervision.py", line 343, in loop
docs = download_wiki_articles(doc_id, limit)
File "distant_supervision.py", line 73, in download_wiki_articles
pages = bs(r, "html.parser").findAll('page')
File "/home/ub16hp/ub16_prj/cnn-re-tf/.venv/local/lib/python2.7/site-packages/bs4/init.py", line 246, in init
elif len(markup) <= 256 and (
TypeError: object of type 'NoneType' has no len()
(.venv) ub16hp@UB16HP:
/ub16_prj/cnn-re-tf$

distant supervision script exists with error

Hello, Thank you for the code.

I have been trying to recreate dataset using same instructions here (https://github.com/may-/cnn-re-tf/issues/3#issuecomment-309293662) it works great till the very end and gives the following error :


Traceback (most recent call last):
File "./distant_supervision.py", line 693, in
main()
File "./distant_supervision.py", line 687, in main
extract_negative()
File "./distant_supervision.py", line 666, in extract_negative
subj = '<' + entities[row['subj'].encode('utf-8')][0] + '>'
KeyError: 'Bell\xc3\xaame'


Any thoughts? thanks in advance

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.