Skip to content

Instantly share code, notes, and snippets.

@alanbuxton
alanbuxton / ner_with_and_without_iob.ipynb
Created Jan 1, 2021
Compare use of IOB vs non-IOB tags in NER
View ner_with_and_without_iob.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View company_type_abbreviations.py
'''
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
View cypress_access_local_storage.js
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 Feb 9, 2018
cabal vs ghc-mod part 2
View cabal
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