Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Looks for Vocabularies in source dir instead of (e.g.) bin/release/net6/ #21

Open
ctwardy opened this issue May 16, 2023 · 0 comments
Open

Comments

@ctwardy
Copy link

ctwardy commented May 16, 2023

The Bert*Tokenizer classes look in "./Vocabularies" which usually refers to the source folders, or at any rate where you have run it from, rather than where it is running.

That works for console apps, but fails in web apps. The .csproj file seems to correctly copy the Vocabularies folder to the run folder (e.g. bin/release/net6/Vocabularies) but it still looks for it in the source folder.

I think the following would work:

var _launchDir = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);

Then use $"{_launchDir}/Vocabularies" as appropriate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant