brmson / yodaqa

A Question Answering system built on top of the Apache UIMA framework.
http://ailao.eu/yodaqa
Other
619 stars 205 forks source link

Question on the Answer datatype. #51

Closed shailendrah closed 8 years ago

shailendrah commented 8 years ago

I did a clone, build and pulled up everything in my intellij IDE. Everything went fine except that it can't locate the Answer datatype. Is there a dependency I am missing ? The offending code fragment is in AnswerScoreLogistic.java. Would greatly appreciate any help.public void process(JCas jcas) throws AnalysisEngineProcessException { logger.debug("scoring with model {}", modelName);

    AnswerStats astats = new AnswerStats(jcas);
    List<AnswerScore> answers = new LinkedList<AnswerScore>();

    for (Answer a : JCasUtil.select(jcas, Answer.class)) {
        AnswerFV fv = new AnswerFV(a, astats);

        double t = intercept;
        double fvec[] = fv.getFV();
        for (int i = 0; i < fvec.length; i++) {
            t += fvec[i] * weights[i];
        }

        double prob = 1.0 / (1.0 + Math.exp(-t));
        answers.add(new AnswerScore(a, prob));
    }

    /* Reindex the touched answer info(s). */
    for (AnswerScore as : answers) {
        as.a.removeFromIndexes();
        as.a.setConfidence(as.score);
        as.a.addToIndexes();
    }
}

}

pasky commented 8 years ago

Have you followed the IntelliJ howto on the wiki? Did your IntelliJ autogenerate the model classes as it should?

shailendrah commented 8 years ago

Thanks. Didn't realize that before firing intelij one needed to do gradlew check, gradlew run -q

k0105 commented 8 years ago

Great to hear updating this thing is actually useful for someone.

shailendrah commented 8 years ago

Hi Petr:

We have exchanged emails a few times w.r.t yodaqa. I have got everything running in my env. including all the data sources (freebase, dbpedia, wikimedia, labels etc). Following that I have refactored the code significantly - my goal is to fork the code so that I can create a platform to wire custom data sources. As I run the refactored code in my debugger, I am getting a null pointer exception in: PassFilter where the FSIndex<?> idx is turning out to be null in the process JCas. Obviously the problem is not this and it has already happened somewhere else in the pipleline. It would be great if you could explain the implementation a little bit or point me to some stuff where this is explained. Please do let me know if the explanation is unclear. - Shailendra

On Sat, Jun 11, 2016 at 3:03 PM, Petr Baudis notifications@github.com wrote:

Have you followed the IntelliJ howto on the wiki? Did your IntelliJ autogenerate the model classes as it should?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/brmson/yodaqa/issues/51#issuecomment-225396964, or mute the thread https://github.com/notifications/unsubscribe/ACSjWIb_igBx9QaGl8fK9De6BvgNGS_Xks5qKzC0gaJpZM4Izmk4 .

Phone : 408 348 3029

pasky commented 8 years ago

Hi!

Basic implementation description is in doc/HIGHLEVEL.md and doc/UIMA-INTRO.md - nothing much besides that and code comments. I'm sorry but I don't have the resources to help you debug your refactored code. However, I'll be happy to review any pull requests once you get it working. :-)

Hi Petr:

We have exchanged emails a few times w.r.t yodaqa. I have got everything running in my env. including all the data sources (freebase, dbpedia, wikimedia, labels etc). Following that I have refactored the code significantly - my goal is to fork the code so that I can create a platform to wire custom data sources. As I run the refactored code in my debugger, I am getting a null pointer exception in: PassFilter where the FSIndex<?> idx is turning out to be null in the process JCas. Obviously the problem is not this and it has already happened somewhere else in the pipleline. It would be great if you could explain the implementation a little bit or point me to some stuff where this is explained. Please do let me know if the explanation is unclear. - Shailendra

On Sat, Jun 11, 2016 at 3:03 PM, Petr Baudis notifications@github.com wrote:

Have you followed the IntelliJ howto on the wiki? Did your IntelliJ autogenerate the model classes as it should?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/brmson/yodaqa/issues/51#issuecomment-225396964, or mute the thread https://github.com/notifications/unsubscribe/ACSjWIb_igBx9QaGl8fK9De6BvgNGS_Xks5qKzC0gaJpZM4Izmk4 .

Phone : 408 348 3029


You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/brmson/yodaqa/issues/51#issuecomment-232368835

            Petr Baudis
If you have good ideas, good data and fast computers,
you can do almost anything. -- Geoffrey Hinton
shailendrah commented 8 years ago

Thanks Petr. I have almost figured it out. Will keep you posted. Also, I would have a call with you to discuss some mutually beneficial proposition. Let me know what would be a good. time. - Shailendra

On Wed, Jul 13, 2016 at 10:00 AM, Petr Baudis notifications@github.com wrote:

Hi!

Basic implementation description is in doc/HIGHLEVEL.md and doc/UIMA-INTRO.md - nothing much besides that and code comments. I'm sorry but I don't have the resources to help you debug your refactored code. However, I'll be happy to review any pull requests once you get it working. :-)

Hi Petr:

We have exchanged emails a few times w.r.t yodaqa. I have got everything running in my env. including all the data sources (freebase, dbpedia, wikimedia, labels etc). Following that I have refactored the code significantly - my goal is to fork the code so that I can create a platform to wire custom data sources. As I run the refactored code in my debugger, I am getting a null pointer exception in: PassFilter where the FSIndex<?> idx is turning out to be null in the process JCas. Obviously the problem is not this and it has already happened somewhere else in the pipleline. It would be great if you could explain the implementation a little bit or point me to some stuff where this is explained. Please do let me know if the explanation is unclear. - Shailendra

On Sat, Jun 11, 2016 at 3:03 PM, Petr Baudis notifications@github.com wrote:

Have you followed the IntelliJ howto on the wiki? Did your IntelliJ autogenerate the model classes as it should?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/brmson/yodaqa/issues/51#issuecomment-225396964, or mute the thread < https://github.com/notifications/unsubscribe/ACSjWIb_igBx9QaGl8fK9De6BvgNGS_Xks5qKzC0gaJpZM4Izmk4

.

Phone : 408 348 3029


You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/brmson/yodaqa/issues/51#issuecomment-232368835

Petr Baudis If you have good ideas, good data and fast computers, you can do almost anything. -- Geoffrey Hinton

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/brmson/yodaqa/issues/51#issuecomment-232419205, or mute the thread https://github.com/notifications/unsubscribe/ACSjWLkj0TBtx3y3Ekgw4HS9di2jitofks5qVRmVgaJpZM4Izmk4 .

Phone : 408 348 3029

pasky commented 8 years ago

I'll be happy to chat e.g. during Thursday, please email me directly to arrange details.

Thanks Petr. I have almost figured it out. Will keep you posted. Also, I would have a call with you to discuss some mutually beneficial proposition. Let me know what would be a good. time. - Shailendra

On Wed, Jul 13, 2016 at 10:00 AM, Petr Baudis notifications@github.com wrote:

Hi!

Basic implementation description is in doc/HIGHLEVEL.md and doc/UIMA-INTRO.md - nothing much besides that and code comments. I'm sorry but I don't have the resources to help you debug your refactored code. However, I'll be happy to review any pull requests once you get it working. :-)

Hi Petr:

We have exchanged emails a few times w.r.t yodaqa. I have got everything running in my env. including all the data sources (freebase, dbpedia, wikimedia, labels etc). Following that I have refactored the code significantly - my goal is to fork the code so that I can create a platform to wire custom data sources. As I run the refactored code in my debugger, I am getting a null pointer exception in: PassFilter where the FSIndex<?> idx is turning out to be null in the process JCas. Obviously the problem is not this and it has already happened somewhere else in the pipleline. It would be great if you could explain the implementation a little bit or point me to some stuff where this is explained. Please do let me know if the explanation is unclear. - Shailendra

On Sat, Jun 11, 2016 at 3:03 PM, Petr Baudis notifications@github.com wrote:

Have you followed the IntelliJ howto on the wiki? Did your IntelliJ autogenerate the model classes as it should?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/brmson/yodaqa/issues/51#issuecomment-225396964, or mute the thread < https://github.com/notifications/unsubscribe/ACSjWIb_igBx9QaGl8fK9De6BvgNGS_Xks5qKzC0gaJpZM4Izmk4

.

Phone : 408 348 3029


You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/brmson/yodaqa/issues/51#issuecomment-232368835

Petr Baudis If you have good ideas, good data and fast computers, you can do almost anything. -- Geoffrey Hinton

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/brmson/yodaqa/issues/51#issuecomment-232419205, or mute the thread https://github.com/notifications/unsubscribe/ACSjWLkj0TBtx3y3Ekgw4HS9di2jitofks5qVRmVgaJpZM4Izmk4 .

Phone : 408 348 3029


You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/brmson/yodaqa/issues/51#issuecomment-232443441

            Petr Baudis
If you have good ideas, good data and fast computers,
you can do almost anything. -- Geoffrey Hinton