<commit_before>import Service from '@ember/service';
import { readOnly } from '@ember/object/computed';
import { shallowEqual, resemblesURL, extractRouteArgs } from '../utils';

/**
   The Router service is the public API that provides access to the router.

   The immediate benefit of the Router service is that you can inject it into components, 
   giving them a friendly way to initiate transitions and ask questions about the current 
   global router state.

   In this example, the Router service is injected into a component to initiate a transition 
   to a dedicated route:
   ```javascript
   import Component from '@ember/component';
   import { inject as service } from '@ember/service';

   export default Component.extend({
     router: service(),

     actions: {
       next() {
         this.get('router').transitionTo('other.route');
       }
     }
   });
   ```

   Like any service, it can also be injected into helpers, routes, etc.

   @public
   @class RouterService
   @category ember-routing-router-service
 */
const RouterService = Service.extend({
  /**
     Name of the current route.

     This property represent the logical name of the route,
     which is comma separated.
     For the following router:

     ```app/router.js
     Router.map(function() {
       this.route('about');
       this.route('blog', function () {
         this.route('post', { path: ':post_id' });
       });
     });
     ```

     It will return:

     * `index` when you visit `/`
     * `about` when you visit `/about`
     * `blog.index` when you visit `/blog`
     * `blog.post` when you visit `/blog/some-post-id`

     @property currentRouteName
     @type String
     @public
   */
  currentRouteName: readOnly('_router.currentRouteName'),

  /**
     Current URL for the application.

    This property represent the URL path for this route.
    For the following router:

     ```app/router.js
     Router.map(function() {
       this.route('about');
       this.route('blog', function () {
         this.route('post', { path: ':post_id' });
       });
     });
     ```

     It will return:

     * `/` when you visit `/`
     * `/about` when you visit `/about`<commit_msg>Fixed a grammar error.<commit_after>import Service from '@ember/service';
import { readOnly } from '@ember/object/computed';
import { shallowEqual, resemblesURL, extractRouteArgs } from '../utils';

/**
   The Router service is the public API that provides access to the router.

   The immediate benefit of the Router service is that you can inject it into components, 
   giving them a friendly way to initiate transitions and ask questions about the current 
   global router state.

   In this example, the Router service is injected into a component to initiate a transition 
   to a dedicated route:
   ```javascript
   import Component from '@ember/component';
   import { inject as service } from '@ember/service';

   export default Component.extend({
     router: service(),

     actions: {
       next() {
         this.get('router').transitionTo('other.route');
       }
     }
   });
   ```

   Like any service, it can also be injected into helpers, routes, etc.

   @public
   @class RouterService
   @category ember-routing-router-service
 */
const RouterService = Service.extend({
  /**
     Name of the current route.

     This property represents the logical name of the route,
     which is comma separated.
     For the following router:

     ```app/router.js
     Router.map(function() {
       this.route('about');
       this.route('blog', function () {
         this.route('post', { path: ':post_id' });
       });
     });
     ```

     It will return:

     * `index` when you visit `/`
     * `about` when you visit `/about`
     * `blog.index` when you visit `/blog`
     * `blog.post` when you visit `/blog/some-post-id`

     @property currentRouteName
     @type String
     @public
   */
  currentRouteName: readOnly('_router.currentRouteName'),

  /**
     Current URL for the application.

    This property represents the URL path for this route.
    For the following router:

     ```app/router.js
     Router.map(function() {
       this.route('about');
       this.route('blog', function () {
         this.route('post', { path: ':post_id' });
       });
     });
     ```

     It will return:

     * `/` when you visit `/`
     * `/about` when you visit `/about`
{'fraction_non_alphanumeric': 0.11776718856364875, 'fraction_numerical': 0.0, 'mean_word_length': 2.5808285946385054, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2493234', 'n_tokens_mistral': 1251, 'n_tokens_neox': 1191, 'n_words': 428}