This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using CorpusLoaders | |
using TextAnalysis | |
using MultiResolutionIterators | |
test=load(CoNLL(),"test") | |
test=flatten_levels(test, lvls(CoNLL, :document)) |> full_consolidate | |
testx=Vector{String}() | |
testy=Vector{String}() | |
tagger =PerceptronTagger(true) | |
for val in 1:length(test) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function load(path) | |
vocab = readlines(path) | |
vocabnew = split.(vocab , "\t") | |
vo = [] | |
for i in 1:30000 | |
vocab1 = vocabnew[i][1] | |
vocab1 = replace(vocab1,"▁"=>"_") | |
push!(vo,vocab1) | |
end | |
vocab1 = convert(Array{String,1},vo) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using JSON | |
using ZipFile | |
using Flux: loadparams! | |
""" | |
tfckpt2bsonforalbert(path; | |
raw=false, | |
saveto="./", |