lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Itamar Syn-Hershko <ita...@code972.com>
Subject Re: [GitHub] lucenenet pull request: port of lucene-solr/lucene/classification ...
Date Sun, 07 Dec 2014 05:15:16 GMT
Can we integrate EditorConfig to enforce this?

https://visualstudiogallery.msdn.microsoft.com/c8bccfe2-650c-4b42-bc5c-845e21f96328
On Dec 7, 2014 7:08 AM, "geobmx540" <git@git.apache.org> wrote:

> Github user geobmx540 commented on a diff in the pull request:
>
>     https://github.com/apache/lucenenet/pull/26#discussion_r21422005
>
>     --- Diff: src/Lucene.Net.Classification/KNearesteighborClassifier.cs
> ---
>     @@ -0,0 +1,150 @@
>     +/*
>     + * Licensed to the Apache Software Foundation (ASF) under one or more
>     + * contributor license agreements.  See the NOTICE file distributed
> with
>     + * this work for additional information regarding copyright ownership.
>     + * The ASF licenses this file to You under the Apache License,
> Version 2.0
>     + * (the "License"); you may not use this file except in compliance
> with
>     + * the License.  You may obtain a copy of the License at
>     + *
>     + *     http://www.apache.org/licenses/LICENSE-2.0
>     + *
>     + * Unless required by applicable law or agreed to in writing, software
>     + * distributed under the License is distributed on an "AS IS" BASIS,
>     + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied.
>     + * See the License for the specific language governing permissions and
>     + * limitations under the License.
>     + */
>     +
>     +namespace Lucene.Net.Classification
>     +{
>     +    using Lucene.Net.Analysis;
>     +    using Lucene.Net.Index;
>     +    using Lucene.Net.Queries.Mlt;
>     +    using Lucene.Net.Search;
>     +    using Lucene.Net.Util;
>     +    using System;
>     +    using System.Collections.Generic;
>     +    using System.IO;
>     +
>     +    /// <summary>
>     +    /// A k-Nearest Neighbor classifier (see <code>
> http://en.wikipedia.org/wiki/K-nearest_neighbors</code>) based
>     +    /// on {@link MoreLikeThis}
>     +    ///
>     +    /// @lucene.experimental
>     +    /// </summary>
>     +    public class KNearestNeighborClassifier : Classifier<BytesRef>
>     +    {
>     +
>     +        private MoreLikeThis _mlt;
>     +        private String[] _textFieldNames;
>     +        private String _classFieldName;
>     +        private IndexSearcher _indexSearcher;
>     +        private readonly int _k;
>     +        private Query _query;
>     +
>     +        private int _minDocsFreq;
>     +        private int _minTermFreq;
>     +
>     +        /// <summary>Create a {@link Classifier} using kNN
> algorithm</summary>
>     +        /// <param name="k">the number of neighbors to analyze as an
> <code>int</code></param>
>     +        public KNearestNeighborClassifier(int k)
>     +        {
>     +        this._k = k;
>     --- End diff --
>
>     indent
>
>
> ---
> If your project is set up for it, you can reply to this email and have your
> reply appear on GitHub as well. If your project does not have this feature
> enabled and wishes so, or if the feature is enabled but not working, please
> contact infrastructure at infrastructure@apache.org or file a JIRA ticket
> with INFRA.
> ---
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message