An implementation of the WHATWG URL Standard in JavaScript

Overview

whatwg-url

whatwg-url is a full implementation of the WHATWG URL Standard. It can be used standalone, but it also exposes a lot of the internal algorithms that are useful for integrating a URL parser into a project like jsdom.

Specification conformance

whatwg-url is currently up to date with the URL spec up to commit 43c2713.

For file: URLs, whose origin is left unspecified, whatwg-url chooses to use a new opaque origin (which serializes to "null").

whatwg-url does not yet implement any encoding handling beyond UTF-8. That is, the encoding override parameter does not exist in our API.

API

The URL and URLSearchParams classes

The main API is provided by the URL and URLSearchParams exports, which follows the spec's behavior in all ways (including e.g. USVString conversion). Most consumers of this library will want to use these.

Low-level URL Standard API

The following methods are exported for use by places like jsdom that need to implement things like HTMLHyperlinkElementUtils. They mostly operate on or return an "internal URL" or "URL record" type.

The stateOverride parameter is one of the following strings:

The URL record type has the following API:

These properties should be treated with care, as in general changing them will cause the URL record to be in an inconsistent state until the appropriate invocation of basicURLParse is used to fix it up. You can see examples of this in the URL Standard, where there are many step sequences like "4. Set context object’s url’s fragment to the empty string. 5. Basic URL parse input with context object’s url as url and fragment state as state override." In between those two steps, a URL record is in an unusable state.

The return value of "failure" in the spec is represented by null. That is, functions like parseURL and basicURLParse can return either a URL record or null.

whatwg-url/webidl2js-wrapper module

This module exports the URL and URLSearchParams interface wrappers API generated by webidl2js.

Development instructions

First, install Node.js. Then, fetch the dependencies of whatwg-url, by running from this directory:

npm install

To run tests:

npm test

To generate a coverage report:

npm run coverage

To build and run the live viewer:

npm run prepare
npm run build-live-viewer

Serve the contents of the live-viewer directory using any web server.

Supporting whatwg-url

The jsdom project (including whatwg-url) is a community-driven project maintained by a team of volunteers. You could support us by:

  • Getting professional support for whatwg-url as part of a Tidelift subscription. Tidelift helps making open source sustainable for us while giving teams assurances for maintenance, licensing, and security.
  • Contributing directly to the project.
Comments
  • browserify support?

    browserify support?

    This lib is written with ES6, so it doesn't get parsed correctly with browserify:

    Parse error at -:3082,12
    SyntaxError: Unexpected token: name (x)
    Error
    

    It'd be great if there were a browser version available to serve as a polyfill for IE.

    opened by stevenvachon 30
  • How to get/set query string parameters?

    How to get/set query string parameters?

    Has URLUtils.searchParams been removed?

    What is the best way to do this?

    Unrelated: Why doesn't URL use the same terminology as RFC3986? (protocol -> scheme, hash -> fragment, search -> query, etc.)

    opened by glen-84 27
  • ReferenceError: TextEncoder is not defined

    ReferenceError: TextEncoder is not defined

    Relative from: https://github.com/Automattic/mongoose/issues/10713

    In https://github.com/jsdom/whatwg-url/blob/master/src/encoding.js line 2 says:

    "use strict";
    const utf8Encoder = new TextEncoder();
    const utf8Decoder = new TextDecoder("utf-8", { ignoreBOM: true });
    

    But node show an error message:

    /app/node_modules/whatwg-url/dist/encoding.js:2
    const utf8Encoder = new TextEncoder();
                        ^
    
    ReferenceError: TextEncoder is not defined
        at Object.<anonymous> (/app/node_modules/whatwg-url/dist/encoding.js:2:21)
        at Module._compile (internal/modules/cjs/loader.js:778:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
        at Module.load (internal/modules/cjs/loader.js:653:32)
        at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
        at Function.Module._load (internal/modules/cjs/loader.js:585:3)
        at Module.require (internal/modules/cjs/loader.js:692:17)
        at require (internal/modules/cjs/helpers.js:25:18)
        at Object.<anonymous> (/app/node_modules/whatwg-url/dist/url-state-machine.js:5:34)
        at Module._compile (internal/modules/cjs/loader.js:778:30)
    

    My node version:

    $ node -v
    v14.17.5
    
    $ npm -v
    6.14.14
    

    The version in package.json of dependency is:

    {
      "_from": "whatwg-url@^9.1.0",
      "_id": "[email protected]",
    

    I installed from mongoose package but have last version of whatwg-url package.

    opened by yhojann-cl 16
  • Update to latest spec

    Update to latest spec

    There's a problem with our URLSearchParams constructor. We explicitly check the objects prototype there, which is not correct, I think, which then fails one of the w3c tests.

    opened by Sebmaster 14
  • "new.target" can't be minified

    In URL.js:

    function URL(url) {
      if (!new.target) {
        throw new TypeError(
          "Failed to construct 'URL'. Please use the 'new' operator; this constructor cannot be called as a function."
        );
      }
    

    Where does this variable new even come from?

    opened by stevenvachon 12
  • URL is not a constructor

    URL is not a constructor

    I'm trying to work with this library. When I try to use it in a new URL(url) way, it says: Type Error: URL is not a constructor

    When I try to use it as function, it says: Type Error: Failed to construct 'URL'. Please use the 'new' operator; this constructor cannot be called as a function.

    I'm using node v6.10.3

    opened by israelidanny 11
  • webidl upgrade broke API in 8.2.0

    webidl upgrade broke API in 8.2.0

    I'm not at all a JS expert but after getting silently upgraded to 8.2.0 I'm seeing the following error in my build:

    TypeError: Cannot read property 'some' of undefined
        at Object.exports.install (/Users/mhughe008/development/vise/node_modules/whatwg-url/dist/URL.js:84:20)
        at exports.installInterfaces (/Users/mhughe008/development/vise/node_modules/jsdom/lib/jsdom/living/interfaces.js:202:24)
        at setupWindow (/Users/mhughe008/development/vise/node_modules/jsdom/lib/jsdom/browser/Window.js:63:3)
        at new Window (/Users/mhughe008/development/vise/node_modules/jsdom/lib/jsdom/browser/Window.js:107:3)
        at exports.createWindow (/Users/mhughe008/development/vise/node_modules/jsdom/lib/jsdom/browser/Window.js:38:10)
    

    Failing at this section of code:

    exports.install = (globalObject, globalNames) => {
      if (!globalNames.some(globalName => exposed.has(globalName))) {
        return;
      }
      class URL {
        constructor(url) {
          if (arguments.length < 1) {
    

    This is using jsdom 16.1.2. Best I can tell this was probably caused by the upgrade to webidl-conversions:

    -    "webidl-conversions": "^5.0.0"
    +    "webidl-conversions": "^6.1.0"
    
    opened by matthughes 10
  • Safari can't load URL.js

    Safari can't load URL.js

    Safari in macOS High Sierra and iOS 11.02 13604.1.38.1.6 fails on URL.js with:

    new.target can't come after a prefix operator

    Issue is webkit, but workaround needs to be applied to webidl2js (and a new version of whatwg-url built). See https://github.com/jsdom/webidl2js/issues/78.

    opened by mikemaccana 10
  • Validation error should not terminate the parser

    Validation error should not terminate the parser

    A validation error indicates a mismatch between input and valid input. User agents, especially conformance checkers, are encouraged to report them somewhere.

    NOTE:

    A validation error does not mean that the parser terminates. Termination of a parser is always stated explicitly, e.g., through a return statement.

    It is useful to signal validation errors as error-handling can be non-intuitive, legacy user agents might not implement correct error-handling, and the intent of what is written might be unclear to other developers.

    It seems that this script throws 'TypeError: Invalid URL' upon a validation error, but that terminates the parser, preventing the availability of the parsed URL parts. This confuses, for example, Live URL Viewer.

    opened by GPHemsley 10
  • ReferenceError: TextEncoder is not defined

    ReferenceError: TextEncoder is not defined

    Got this error on Docker Ubuntu, whatwg-url got from npm i whatwg-url:

    const utf8Encoder = new TextEncoder();
                        ^
    
    ReferenceError: TextEncoder is not defined
    
    
    Full Error Log

    yes, even hidden code blocks!

    [email protected]:/app/ApiServer# npm start
    
    > [email protected] start /app/ApiServer
    > node index.js
    
    /app/ApiServer/node_modules/whatwg-url/dist/encoding.js:2
    const utf8Encoder = new TextEncoder();
                        ^
    
    ReferenceError: TextEncoder is not defined
        at Object.<anonymous> (/app/ApiServer/node_modules/whatwg-url/dist/encoding.js:2:21)
        at Module._compile (internal/modules/cjs/loader.js:778:30)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
        at Module.load (internal/modules/cjs/loader.js:653:32)
        at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
        at Function.Module._load (internal/modules/cjs/loader.js:585:3)
        at Module.require (internal/modules/cjs/loader.js:692:17)
        at require (internal/modules/cjs/helpers.js:25:18)
        at Object.<anonymous> (/app/ApiServer/node_modules/whatwg-url/dist/url-state-machine.js:5:34)
        at Module._compile (internal/modules/cjs/loader.js:778:30)
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! [email protected] start: `node index.js`
    npm ERR! Exit status 1
    npm ERR!
    npm ERR! Failed at the [email protected] start script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /root/.npm/_logs/2021-09-07T11_30_49_084Z-debug.log
    
    

    Solution helped for me:

    nano /app/MyProj/node_modules/whatwg-url/dist/encoding.js
    

    and just add new line:

    const { TextEncoder, TextDecoder } = require("util");
    
    opened by santiagz 9
  • Webpack build fails (react-scripts 0.9.5)

    Webpack build fails (react-scripts 0.9.5)

    When importing and using URL in an app created with create-react-app, building a production app fails with:

    > react-scripts build
    
    Creating an optimized production build...
    Failed to compile.
    
    static/js/main.38ef0137.js from UglifyJs
    SyntaxError: Name expected [./~/whatwg-url/lib/url-state-machine.js:6,0]
    
    opened by DawidLoubser 9
  • Punycode domains are not properly validated

    Punycode domains are not properly validated

    Start with the input:

    http://xn--ls8h/

    It works, as it should, and the result is the same. It's the poop emoji, in case you were wondering. It's in the WPT tests.

    Anyway, we can just start adding text to the end of this. For example:

    (Input) -> (JSDOM output)
    
    "http://xn--ls8h=/" -> "http://xn--js8hea/"
    "http://xn--ls8h==/" -> "http://xn--hs8hdh/"
    "http://xn--ls8h===/" -> "http://xn--gs8hcfj/"
    
    "http://xn--ls8h===helloworldhowareyoutoday/" -> "http://xn--gs8hcaceekclworldhowareyoutoday/"
                       ^^^^^^^^^^^^^^^^^^^^^^^^                              ^^^^^^^^^^^^^^^^^^^
    

    All of these inputs are invalid. Safari refuses to parse them, and my own IDNA implementation agrees. The tail part of the Punycode domain (after the xn--) should only consist of ASCII alphanumerics; having "=" signs in there (in the input) is clearly invalid.

    opened by karwa 1
  • Generalise file host parsing

    Generalise file host parsing

    This removes the file host state and parses file URL authorities using the generic authority state.

    The outward behaviour is unchanged and all tests are passing.

    One thing that might warrant another look is that the host parser can now return an empty host. Empty hosts are allowed in file URLs but not in other special URLs. This is now enforced elsewhere.

    There are checks in place that return failure if the URL is a file URL that has credentials or a port. There is some discussion about whether that should be changed in https://github.com/whatwg/url/issues/548 and https://github.com/whatwg/url/issues/97. This should help with whatever is decided there.

    opened by alwinb 0
  • What to do about validation errors

    What to do about validation errors

    The URL standard is getting more sophisticated about validation errors. See e.g. https://github.com/whatwg/url/issues/406.

    There is also the issue where the URL standard contains two different ways of checking URL validity, which are probably not equivalent; see some discussion in https://github.com/whatwg/url/issues/437#issuecomment-488022818. I'll call these "parser validity" and "writing validity", since the latter is derived from the URL writing section.

    It would be very neat if this package could provide:

    • Whether a URL is writing-valid. (At least for "absolute-URL-with-fragment string"; maybe relative URLs are out of scope.)
    • Whether a URL is parser-valid, including the name of any validation error(s) triggered during parsing.
    • Surface this information in the live URL viewer.
    • A test corpus of valid/invalid URLs, maybe drawn from urltestdata.json. We should at least have one parser-invalid URL for every named parser validation error, and it'd also be good to have writing-invalid URLs derived from systematically violating every rule in the writing URLs section.
    • Bonus: a fuzzer that generates strings and tests if they are parser-valid but writing-invalid, or parser-invalid but writing-valid.

    Right now we have some not-very-well-maintained code to track validation errors when the spec says to do so. It does this by setting urlStateMachine.parseError to true. ("parse error" is the old name for "validation error".) We'd probably want to update this to an array of strings (representing validation error names) that get pushed. And we should probably expose it on the URL record; that's #61. Or maybe elsewhere, since if you get a parsing failure, there's no URL record, so any fatal validation errors would be invisible this way?

    We have some known places where we miss validation errors that the spec asks about; I think most of them are due to not implementing "is a URL code point", which #59 tried to address, but got stalled.


    One reason why I was ambivalent about #59 is that it's a good bit of code, and potentially performance cost, for validity checking. At least one major consumer of this project, jsdom, prefers speed, and has no use for validity checking. It would also add memory consumption for every URL record, especially if as per the above we go beyond the simple boolean to instead be an array of strings.

    On the other hand, there aren't many other consumers of this project for "production" use. Everyone else should probably be using the built-in URL constructor in their environment (either Node or the browser). And we're not exactly tuned for speed anyway; there is probably lower-hanging fruit we're ignoring.

    We could address this in a number of ways, e.g.:

    • Take the code size hit, and benchmark the speed hit. (Probably after #155 gets us some basic benchmarks.) Maybe it's fine for jsdom's purposes.

    • Use source code rewriting to prune out validity-related parts of the parser code, so that we end up with two output .js files, e.g. url-state-machine-with-validy-checking.js and url-state-machine.js. (Related: #153, and maybe #155 because if we remove the p() source code rewriting then this would just be adding some back.) This would result in a larger npm package size but a smaller loaded-into-memory size.

    opened by domenic 0
  • No low-level access to parseError

    No low-level access to parseError

    As far as I can tell there's no low-level access to parseError. This makes it impossible to implement a simple validator on top of this code. (It would be even better for that to have detailed messages of course, but a boolean is a start.)

    opened by annevk 0
  • implement isURLCodePoint

    implement isURLCodePoint

    Perhaps you were waiting since it's not a pretty thing to have to implement. I'm doing it for my own purposes, so here's a version in what I think is your style if you want it.

    opened by cameronsteele 4
Releases(v12.0.0)
  • v12.0.0(Jan 3, 2023)

    Breaking change: removed Node.js v12 support.

    Changed the characters allowed in domains vs. generic hosts, per https://github.com/whatwg/url/commit/35e195a2cce7b82694284b8f60caeaf7b43087b4.

    Changed the URL API's search and hash setters, as well as the URLSearchParams API, to always ensure the URL is serialize-parse roundtrippable, per https://github.com/whatwg/url/commit/fdaa0e5a3790693a82f578d7373f216d8fef9ac8.

    Source code(tar.gz)
    Source code(zip)
  • v11.0.0(Oct 19, 2021)

    The breaking changes in this release are only to the Low-level URL Standard API. No actual URL parsing or serialization behavior has changed, and users of the URL and URLSearchParams exports are not affected.

    These changes follow https://github.com/whatwg/url/commit/fbaa03cb19ee5718953f5f6d179e0339e31f1ede.

    • Removed the URL record type's cannotBeABaseURL property.
    • Changed the URL record type's path from always being an array of strings, to being either a single string or an array of strings.
    • Renamed the "cannot-be-a-base-URL path" parser state (i.e. value for stateOverride) to "opaque path".
    • Added the serializePath(urlRecord) export.
    • Added the hasAnOpaquePath(urlRecord) export.
    Source code(tar.gz)
    Source code(zip)
  • v10.0.0(Oct 6, 2021)

    The breaking changes in this release are to the API exported by the whatwg-url/webidl2js-wrapper module. In particular it now is based on webidl2js v17, which changes some of the exported function signatures, and changes the realms of any errors thrown on misuse.

    Source code(tar.gz)
    Source code(zip)
  • v9.1.0(Aug 9, 2021)

    Made the host parser reject non-IPv4 domains that end in numbers, per https://github.com/whatwg/url/commit/ab0e820b0b559610b30c731b7f2c1a8094181680.

    Source code(tar.gz)
    Source code(zip)
  • v9.0.0(Jun 26, 2021)

    Breaking changes:

    • Removed Node.js v10 support.

    • The percentDecode() export was renamed percentDecodeBytes(), and now returns a Uint8Array instead of a Node.js Buffer.

    Other changes:

    • The package's main module now exports the percentDecodeString() helper.

    • The punycode and lodash dependencies were removed.

    Source code(tar.gz)
    Source code(zip)
  • v8.7.0(Jun 25, 2021)

    Make the pathname setter not mess up the URL's path state tracking when given the empty string, per https://github.com/whatwg/url/commit/0672f2e2ef43aca18b59d90abb6dac21712399bb.

    Source code(tar.gz)
    Source code(zip)
  • v8.6.0(Jun 8, 2021)

    Made the hostname setter do nothing if the given string contains a colon, per https://github.com/whatwg/url/commit/ec96993653a70d063843e0198694028c63348db4.

    Updated punycode processing to support Unicode v13.

    Source code(tar.gz)
    Source code(zip)
  • v8.5.0(Mar 24, 2021)

  • v8.4.0(Oct 8, 2020)

    Fixed file: URL parsing cases which would cause different results when serialized-then-reparsed, per https://github.com/whatwg/url/commit/a19495e27ad95154543b46f751d1a1bf25553808.

    Source code(tar.gz)
    Source code(zip)
  • v8.3.0(Sep 30, 2020)

  • v8.2.2(Sep 6, 2020)

  • v8.2.1(Sep 6, 2020)

  • v8.2.0(Aug 24, 2020)

    Made <, >, and ^ in the host component cause parsing failures, per https://github.com/whatwg/url/commit/302ba419cb3248568243aaf7b5aca9003694d5c3.

    Fixed the parsing-then-serializing of non-special URLs to be idempotent, per https://github.com/whatwg/url/commit/83adf0c9ca9a88948e1e5d93374ffded04eec727.

    Source code(tar.gz)
    Source code(zip)
  • v8.1.0(May 8, 2020)

    Changed fragment parsing so that U+0000 code points are now percent-encoded, instead of removed, per https://github.com/whatwg/url/commit/3d574017081f6594ce1fa7a5107027c83dbe931f.

    Changed file: URL parsing so that if the host ends up empty after the Unicode ToASCII operation, it now result in parsing failure, per https://github.com/whatwg/url/commit/cceb4356cca233b6dfdaabd888263157b2204e44.

    Source code(tar.gz)
    Source code(zip)
  • v8.0.0(Jan 2, 2020)

    The breaking change in this release is raising the minimum Node.js version to v10.

    This release introduces the whatwg-url/webidl2js-wrapper module, which can be used to install URL and URLSearchParams constructors on arbitrary global objects. (This is useful for jsdom, after jsdom/[email protected]). Consumers of the default whatwg-url module are not affected.

    Source code(tar.gz)
    Source code(zip)
  • v7.1.0(Oct 21, 2019)

    Removed gopher: special-case parsing and origin computation, per https://github.com/whatwg/url/commit/d589670451a4da9717bad69ed5d5364f93fede33 and https://github.com/whatwg/url/commit/7ae1c691c96f0d82fafa24c33aa1e8df9ffbf2bc.

    Source code(tar.gz)
    Source code(zip)
  • v7.0.0(Aug 18, 2018)

    Changed file: URLs to have an opaque origin, which serializes to "null". Previously all file: URLs shared an origin serialization of "file://". This is underspecified, so either behavior is technically correct, but opaque origins is the more conservative choice.

    Improved error messages for invalid input URLs to include those input strings.

    Upgraded our webidl2js built-time code-generation dependency from 7.4.x to 9.x; see that package's changelog for details.

    Source code(tar.gz)
    Source code(zip)
  • v6.5.0(Jun 8, 2018)

    Percent-encoded ' characters in the query portion of URLs with special schemes, per https://github.com/whatwg/url/commit/6ef17ebe1220a7e7c0cfff0785017502ee18808b.

    Source code(tar.gz)
    Source code(zip)
  • v6.4.1(Apr 22, 2018)

  • v6.4.0(Dec 5, 2017)

    Changed percent-escaping rules in the query portion of URLs, per https://github.com/whatwg/url/commit/7a3c69f8a1583b33e730c3fea85141a618e7c697.

    Source code(tar.gz)
    Source code(zip)
  • v6.3.0(Sep 25, 2017)

    Fixed Windows drive letter handling when resolving relative to another Windows-drive-letter-containing URL, per https://github.com/whatwg/url/commit/2eef975e989cb5ae2d62467394778fd6778ddec9.

    Source code(tar.gz)
    Source code(zip)
  • v6.2.1(Sep 25, 2017)

  • v6.2.0(Sep 25, 2017)

    Fixed URLSearchParams to remove the "?" from its parent URL if the query becomes empty, per https://github.com/whatwg/url/commit/43158268deb10343057998b8d761a193e9f3dc8a.

    Source code(tar.gz)
    Source code(zip)
  • v6.1.0(Jun 30, 2017)

    Made the scheme setter properly reset the port as appropriate, per https://github.com/whatwg/url/commit/0f53958338bbaec3882f902897873da59ba7e8bd.

    Source code(tar.gz)
    Source code(zip)
  • v6.0.1(Jun 29, 2017)

  • v6.0.0(Jun 29, 2017)

    Node.js v6 is now required, as we have started using JavaScript language features not present in earlier versions.

    Added spec-compliant URLSearchParams support, both as an export and through the searchParams property of URL instances. (@TimothyGu)

    Added the percentDecode function to the public API.

    Added the cannotHaveAUsernamePasswordPort function to the public API. It was previously documented in the README, but accidentally not exported.

    Changed the return value representing failure from the string "failure" to null.

    Upgraded our webidl2js and webidl-conversions dependencies, bringing along various edge-case features and fixes, such as a proper Symbol.toStringTag on URL instances and better error messages.

    Source code(tar.gz)
    Source code(zip)
  • v5.0.0(May 26, 2017)

    Changed origin serialization to be the ASCII serialization of the origin, instead of the now-no-longer-a-thing Unicode serialization, per https://github.com/whatwg/url/commit/20c3257194db218c47526ba4ef4894a09e3847c9.

    This changed the public API by removing serializeURLToUnicodeOrigin and instead exporting serializeURLOrigin.

    Source code(tar.gz)
    Source code(zip)
  • v4.8.0(May 10, 2017)

    Fixed Windows drive letter handling with a file: base URL, per https://github.com/whatwg/url/commit/fe6b251739e225555f04319f19c70c031a5d99eb.

    Source code(tar.gz)
    Source code(zip)
  • v4.7.1(Apr 24, 2017)

  • v4.7.0(Apr 3, 2017)

    Changed file URLs to trim leading slashes from their paths, per https://github.com/whatwg/url/commit/6103e0a58eb2460d409056fb2b93b015941b64f2.

    Source code(tar.gz)
    Source code(zip)
Simple image captioning model - CLIP prefix captioning.

Simple image captioning model - CLIP prefix captioning.

688 Jan 04, 2023
Only a Matter of Style: Age Transformation Using a Style-Based Regression Model

Only a Matter of Style: Age Transformation Using a Style-Based Regression Model The task of age transformation illustrates the change of an individual

444 Dec 30, 2022
A Simple Framwork for CV Pre-training Model (SOCO, VirTex, BEiT)

A Simple Framwork for CV Pre-training Model (SOCO, VirTex, BEiT)

Sense-GVT 14 Jul 07, 2022
Reviatalizing Optimization for 3D Human Pose and Shape Estimation: A Sparse Constrained Formulation

Reviatalizing Optimization for 3D Human Pose and Shape Estimation: A Sparse Constrained Formulation This is the implementation of the approach describ

Taosha Fan 47 Nov 15, 2022
The official implementation of Theme Transformer

Theme Transformer This is the official implementation of Theme Transformer. Checkout our demo and paper : Demo | arXiv Environment: using python versi

Ian Shih 85 Dec 08, 2022
Codes for CyGen, the novel generative modeling framework proposed in "On the Generative Utility of Cyclic Conditionals" (NeurIPS-21)

On the Generative Utility of Cyclic Conditionals This repository is the official implementation of "On the Generative Utility of Cyclic Conditionals"

Chang Liu 44 Nov 16, 2022
Cryptocurrency Prediction with Artificial Intelligence (Deep Learning via LSTM Neural Networks)

Cryptocurrency Prediction with Artificial Intelligence (Deep Learning via LSTM Neural Networks)- Emirhan BULUT

Emirhan BULUT 102 Nov 18, 2022
Multi-task yolov5 with detection and segmentation based on yolov5

YOLOv5DS Multi-task yolov5 with detection and segmentation based on yolov5(branch v6.0) decoupled head anchor free segmentation head README中文 Ablation

150 Dec 30, 2022
A Re-implementation of the paper "A Deep Learning Framework for Character Motion Synthesis and Editing"

What is This This is a simple re-implementation of the paper "A Deep Learning Framework for Character Motion Synthesis and Editing"(1). Only Sections

102 Dec 14, 2022
Benchmark datasets, data loaders, and evaluators for graph machine learning

Overview The Open Graph Benchmark (OGB) is a collection of benchmark datasets, data loaders, and evaluators for graph machine learning. Datasets cover

1.5k Jan 05, 2023
Fortuitous Forgetting in Connectionist Networks

Fortuitous Forgetting in Connectionist Networks Introduction This repository includes reference code for the paper Fortuitous Forgetting in Connection

Hattie Zhou 14 Nov 26, 2022
LUKE -- Language Understanding with Knowledge-based Embeddings

LUKE (Language Understanding with Knowledge-based Embeddings) is a new pre-trained contextualized representation of words and entities based on transf

Studio Ousia 587 Dec 30, 2022
[ICCV 2021 Oral] PoinTr: Diverse Point Cloud Completion with Geometry-Aware Transformers

PoinTr: Diverse Point Cloud Completion with Geometry-Aware Transformers Created by Xumin Yu*, Yongming Rao*, Ziyi Wang, Zuyan Liu, Jiwen Lu, Jie Zhou

Xumin Yu 317 Dec 26, 2022
QRec: A Python Framework for quick implementation of recommender systems (TensorFlow Based)

Introduction QRec is a Python framework for recommender systems (Supported by Python 3.7.4 and Tensorflow 1.14+) in which a number of influential and

Yu 1.4k Dec 30, 2022
End-to-end speech secognition toolkit

End-to-end speech secognition toolkit This is an E2E ASR toolkit modified from Espnet1 (version 0.9.9). This is the official implementation of paper:

Jinchuan Tian 147 Dec 28, 2022
A simple, clean TensorFlow implementation of Generative Adversarial Networks with a focus on modeling illustrations.

IllustrationGAN A simple, clean TensorFlow implementation of Generative Adversarial Networks with a focus on modeling illustrations. Generated Images

268 Nov 27, 2022
Code for the RA-L (ICRA) 2021 paper "SeqNet: Learning Descriptors for Sequence-Based Hierarchical Place Recognition"

SeqNet: Learning Descriptors for Sequence-Based Hierarchical Place Recognition [ArXiv+Supplementary] [IEEE Xplore RA-L 2021] [ICRA 2021 YouTube Video]

Sourav Garg 63 Dec 12, 2022
A basic implementation of Layer-wise Relevance Propagation (LRP) in PyTorch.

Layer-wise Relevance Propagation (LRP) in PyTorch Basic unsupervised implementation of Layer-wise Relevance Propagation (Bach et al., Montavon et al.)

Kai Fabi 28 Dec 26, 2022
CDTrans: Cross-domain Transformer for Unsupervised Domain Adaptation

CDTrans: Cross-domain Transformer for Unsupervised Domain Adaptation [arxiv] This is the official repository for CDTrans: Cross-domain Transformer for

238 Dec 22, 2022
PGPortfolio: Policy Gradient Portfolio, the source code of "A Deep Reinforcement Learning Framework for the Financial Portfolio Management Problem"(https://arxiv.org/pdf/1706.10059.pdf).

This is the original implementation of our paper, A Deep Reinforcement Learning Framework for the Financial Portfolio Management Problem (arXiv:1706.1

Zhengyao Jiang 1.5k Dec 29, 2022