brave-intl / bat-native-usermodel Goto Github PK
View Code? Open in Web Editor NEWLicense: Mozilla Public License 2.0
License: Mozilla Public License 2.0
c75 switches Windows to using libc++
which seems to be causing a compilation error in usermodel_unittest.cc:54
in std::ifstream ifs(path.value());
../../brave/vendor/bat-native-usermodel/test/usermodel_unittest.cc(54,19): error: no matching constructor for initialization of 'std::ifstream' (aka 'basic_ifstream') std::ifstream ifs(path.value()); Candidate constructors: explicit basic_ifstream(const char* __s, ios_base::openmode __mode = ios_base::in); explicit basic_ifstream(const wchar_t* __s, ios_base::openmode __mode = ios_base::in); explicit basic_ifstream(const string& __s, ios_base::openmode __mode = ios_base::in); basic_ifstream(basic_ifstream&& __rhs); basic_ifstream(); ^ 1 error generated.
FilePath
defines const StringType& value() const
and StringType
is defined as
#if defined(OS_WIN) // On Windows, for Unicode-aware applications, native pathnames are wchar_t // arrays encoded in UTF-16. typedef std::wstring StringType; #elif defined(OS_POSIX) || defined(OS_FUCHSIA) // On most platforms, native pathnames are char arrays, and the encoding // may or may not be specified. On Mac OS X, native pathnames are encoded // in UTF-8. typedef std::string StringType; #endif // OS_WIN
So, on Windows this returns a std::wstring
. MSVC probably has an additional constructor, but libc++ doesn't. Changing the code to explicitly get wchar_t* std::ifstream ifs(path.value().c_str());
fixes it.
All repos that are used in production should have branch protection set up; see https://github.com/brave/internal/wiki/Pull-request-security-audit-checklist#github-repository-security for details
$ gn check . //brave/vendor/bat-native-usermodel/*
ERROR at //brave/vendor/bat-native-usermodel/BUILD.gn:46:1: Source file not found.
source_set("usermodel") {
^------------------------
The target:
//brave/vendor/bat-native-usermodel:usermodel
has a source file:
//brave/vendor/bat-native-usermodel/advertising_categories.h
which was not found.
```
Cleanup project structure
Currently the html passed to the classifier is only a subset of the full html. Pass the entirety of the extracted html.body.text to the classifier
Add ability to get taxonomy names
Based on feedback from our user group, some of this content is being misclassified:
We are going to train a model for Japanese content, similar to what was done for the German model, from translated content into our current taxonomy. In the short term, the model should match the short term interest with the ad, until we can train a more sophisticated one.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.