ds300 / ds300/apt

NPE when producing unigram vectors

Open
#7 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
3
Forks
3
PR merge metrics
No merged PRs in 30d

Description

Sometimes (I cannot reliably reproduce this) after a lexicon is built, its iterator continues to yield entity identifiers after all entities have been traversed. A buggy lexicon and the input file used to build those are available [here.](https://www.dropbox.com/sh/h0zatg1sb9tned4/AAD6rX-_6I9-imf44VwjKgIMa?dl=0).

When a lexicon gets messed up, [this line](https://github.com/ds300/apt/blob/a12d0700f8bdb0ea11635a275be9da64e49d533e/src/java/uk/ac/susx/tag/apt/tasks/Vectors.java#L92) throws a NPE, because `entityIndexer.resolve(entityId)` return `null`. This is because the `entityId ==3269`, but there are only `3268` entities in the lexicon.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.