You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by NightOwl888 <gi...@git.apache.org> on 2016/10/03 15:19:00 UTC

[GitHub] lucenenet pull request #190: Ported Analysis.Stempel

GitHub user NightOwl888 opened a pull request:

    https://github.com/apache/lucenenet/pull/190

    Ported Analysis.Stempel

    All 16 tests are passing.
    
    I ended up porting over `DataInputStream` and `DataOutputStream` and their corresponding interfaces from Java to save time. There is probably a way to make `Egothor.Stemmer` work with `BinaryReader` and `BinaryReader`, but these classes write the bytes in reverse order from Java and also do not have the corresponding `WriteUTF` and `ReadUTF` methods that use a proprietary UTF-8 format. The upside is that it now writes files that are *probably* compatible with Java, however since these are temp files I doubt it matters very much.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/NightOwl888/lucenenet analysis-stempel

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/lucenenet/pull/190.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #190
    
----
commit dd8d0a05ee472611900422027935d9696a54ad28
Author: Shad Storhaug <sh...@shadstorhaug.com>
Date:   2016-10-02T14:37:26Z

    Ported Analysis.Stempel + tests

----


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

[GitHub] lucenenet pull request #190: Ported Analysis.Stempel

Posted by NightOwl888 <gi...@git.apache.org>.
Github user NightOwl888 commented on a diff in the pull request:

    https://github.com/apache/lucenenet/pull/190#discussion_r82028284
  
    --- Diff: Lucene.Net.sln ---
    @@ -59,14 +60,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lucene.Net.Suggest", "src\L
     EndProject
     Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lucene.Net.Tests.Suggest", "src\Lucene.Net.Tests.Suggest\Lucene.Net.Tests.Suggest.csproj", "{A6511598-3008-4A3B-AE68-2D1DA792CA8A}"
     EndProject
    -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lucene.Net.QueryParser", "src\Lucene.Net.QueryParser\Lucene.Net.QueryParser.csproj", "{949BA34B-6AE6-4CE3-B578-61E13E4D76BF}"
    -EndProject
    -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lucene.Net.Tests.QueryParser", "src\Lucene.Net.Tests.QueryParser\Lucene.Net.Tests.QueryParser.csproj", "{5719FB4F-BF80-40E5-BACC-37E8E18FCA2E}"
    -EndProject
     Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lucene.Net.Memory", "src\Lucene.Net.Memory\Lucene.Net.Memory.csproj", "{42ECF239-AFC1-427D-921E-B5A277809CF0}"
    --- End diff --
    
    I merged master into this branch - it seems to have removed this.


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

[GitHub] lucenenet pull request #190: Ported Analysis.Stempel

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/lucenenet/pull/190


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

[GitHub] lucenenet pull request #190: Ported Analysis.Stempel

Posted by NightOwl888 <gi...@git.apache.org>.
Github user NightOwl888 commented on a diff in the pull request:

    https://github.com/apache/lucenenet/pull/190#discussion_r82028685
  
    --- Diff: src/Lucene.Net.Core/Support/DataInputStream.cs ---
    @@ -0,0 +1,323 @@
    +\ufeffusing System;
    +using System.IO;
    +
    +namespace Lucene.Net.Support
    +{
    +    /// <summary>
    +    /// Java's DataInputStream is similar to .NET's BinaryReader. However, it reads
    +    /// using a modified UTF-8 format that cannot be read using BinaryReader.
    +    /// This is a port of DataInputStream that is fully compatible with Java's DataOutputStream.
    +    /// </summary>
    +    public class DataInputStream : IDataInput, IDisposable
    --- End diff --
    
    I added all of the tests I could find from Java for these 2 classes. Do note that the ReadDouble() method is not implemented because we don't have `Number.LongBitsToDouble()` implemented. Neither are currently required by Lucene.Net


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

[GitHub] lucenenet pull request #190: Ported Analysis.Stempel

Posted by synhershko <gi...@git.apache.org>.
Github user synhershko commented on a diff in the pull request:

    https://github.com/apache/lucenenet/pull/190#discussion_r81838986
  
    --- Diff: Lucene.Net.sln ---
    @@ -59,14 +60,14 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lucene.Net.Suggest", "src\L
     EndProject
     Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lucene.Net.Tests.Suggest", "src\Lucene.Net.Tests.Suggest\Lucene.Net.Tests.Suggest.csproj", "{A6511598-3008-4A3B-AE68-2D1DA792CA8A}"
     EndProject
    -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lucene.Net.QueryParser", "src\Lucene.Net.QueryParser\Lucene.Net.QueryParser.csproj", "{949BA34B-6AE6-4CE3-B578-61E13E4D76BF}"
    -EndProject
    -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lucene.Net.Tests.QueryParser", "src\Lucene.Net.Tests.QueryParser\Lucene.Net.Tests.QueryParser.csproj", "{5719FB4F-BF80-40E5-BACC-37E8E18FCA2E}"
    -EndProject
     Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lucene.Net.Memory", "src\Lucene.Net.Memory\Lucene.Net.Memory.csproj", "{42ECF239-AFC1-427D-921E-B5A277809CF0}"
    --- End diff --
    
    please revert this change


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

[GitHub] lucenenet pull request #190: Ported Analysis.Stempel

Posted by synhershko <gi...@git.apache.org>.
Github user synhershko commented on a diff in the pull request:

    https://github.com/apache/lucenenet/pull/190#discussion_r81839278
  
    --- Diff: src/Lucene.Net.Core/Support/DataInputStream.cs ---
    @@ -0,0 +1,323 @@
    +\ufeffusing System;
    +using System.IO;
    +
    +namespace Lucene.Net.Support
    +{
    +    /// <summary>
    +    /// Java's DataInputStream is similar to .NET's BinaryReader. However, it reads
    +    /// using a modified UTF-8 format that cannot be read using BinaryReader.
    +    /// This is a port of DataInputStream that is fully compatible with Java's DataOutputStream.
    +    /// </summary>
    +    public class DataInputStream : IDataInput, IDisposable
    --- End diff --
    
    is it possible to add good tests around those, before they start being used from core parts as well ?


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