sergey-tihon / Stanford.NLP.NET

Stanford NLP for .NET
http://sergey-tihon.github.io/Stanford.NLP.NET/
MIT License
595 stars 123 forks source link

Assembly 'Assets/Plugins/stanford-corenlp-3.9.2.dll' will not be loaded due to errors #105

Closed Rand0m-Guy closed 4 years ago

Rand0m-Guy commented 4 years ago

Hello! I'm trying to use the .NET port of Stanford CoreNLP in Unity (I made an issue a couple of days ago, sorry for bugging y'all). When loading up my code, I get 2 particular mistakes I can't get rid of: Assembly 'Library/ScriptAssemblies/Assembly-CSharp.dll' will not be loaded due to errors: Reference has errors 'stanford-corenlp-3.9.2'. and

Assembly 'Assets/Plugins/stanford-corenlp-3.9.2.dll' will not be loaded due to errors:
Unable to resolve reference 'protobuf'. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
Unable to resolve reference 'ejml-0.23'. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
Unable to resolve reference 'slf4j-api'. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
Unable to resolve reference 'jollyday'. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
Unable to resolve reference 'xom'. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
Unable to resolve reference 'javax.json'. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
Unable to resolve reference 'joda-time'. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.

When trying to load my script, I get an error image

This is my script:

using System.Collections;
using System.Collections.Generic;
using edu.stanford.nlp.pipeline;
using edu.stanford.nlp.ling;
using java.util;
using UnityEngine;

public class TEST : MonoBehaviour
{

    StanfordCoreNLP scnlp;
    Properties props;
    string propname = "tokenize, ssplit, pos, lemma, ner";
    string text = "Hola, me llamo Pablo Macias";

    // Start is called before the first frame update
    void Start()
    {
        props = new Properties();
        props.setProperty("annotators", propname);
        scnlp = new StanfordCoreNLP(props);

        CoreDocument cd = new CoreDocument(text);
        scnlp.annotate(cd);
        List<CoreLabel> cllist = (System.Collections.Generic.List<CoreLabel>)cd.tokens();

        for (int i = 0; i < cllist.Count; i++) {
            Debug.Log(cllist[i]);
        }
    }

    // Update is called once per frame
    void Update()
    {

    }
}

My file tree is also visible in the image. Any help is greatly appreciated! Thanks!

Rand0m-Guy commented 4 years ago

Yep sorry screwed up again and found that I'm super stupid again, thanks anyway