Skip to content

Instantly share code, notes, and snippets.

@alanbuxton
alanbuxton / ner_with_and_without_iob.ipynb
Created January 1, 2021 16:24
Compare use of IOB vs non-IOB tags in NER
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
'''
Data extracted from https://en.wikipedia.org/wiki/List_of_legal_entity_types_by_country
This is extracted verbatim, including punctuation, from the wikipedia page. So there will be entries for both Ltd and Ltd. depending on what was written on the page.
Be careful with unicode data, because, e.g.
'KT vs КТ'.lower() == 'kt vs кт'
Just because it looks the same doesn't mean the characters are the same
describe ("accessing local storage", function() {
function logLocalStorage() {
Object.keys(localStorage).forEach(key => {
cy.log(key + ": " + localStorage[key])
})
}
// if local storage exists it will be logged out here because afterEach happens after each test completes
afterEach(() => {
@alanbuxton
alanbuxton / cabal
Last active February 9, 2018 06:22
cabal vs ghc-mod part 2
alan@alan-haskell01:~/tmp-ghc-mod$ cat tmp-ghc-mod.cabal
-- Initial tmp-ghc-mod.cabal generated by cabal init. For further
-- documentation, see http://haskell.org/cabal/users-guide/
name: tmp-ghc-mod
version: 0.1.0.0
-- synopsis:
-- description:
-- license:
license-file: LICENSE