Giter Site home page Giter Site logo

bat-native-usermodel's People

Contributors

brendaneich avatar bridiver avatar dimmu avatar emerick avatar fmarier avatar jumde avatar kevinlawler avatar mkarolin avatar orspetol avatar ptigas avatar tmancey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bat-native-usermodel's Issues

Compiler error on Windows with Chromium 75.

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.

Fix deps in BUILD.gn

$ 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.
```

Train and create a JSON Japanese user model

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.