Stanford CoreNLP caseless classifier in NLTK - python-2.7

I can't find the file english.conll.4class.caseless.distsim.crf.ser.gz from the zip file downloaded from http://nlp.stanford.edu/software/stanford-ner-2015-04-20.zip .Can anyone please tell me how to get that caseless classfier from Stanford CoreNLP?

I don't think they are giving a direct gz files for caseless but are deriving via a makefile script, I checked in linux versions aswell and its not available there too, and somehow they are building it via truecaser it seems, While I dont totally understand the mechanism, below is a pointer, where I see the references in stanford core nlp git hub.
https://github.com/stanfordnlp/CoreNLP/blob/d558d95d80b36b5b45bc21882cbc0ef7452eda24/scripts/ner/Makefile
You can search for "english.conll.4class.caseless.distsim.crf.ser.gz" in corenlp github for more pointers about it.
FYI.. you can also look at older versions, as its mentioned in the doc that they have provided them seperately.

For those who face the same problem;
Download model jar from https://stanfordnlp.github.io/CoreNLP/index.html#download (There is a table that lists different models for different languages) and open/extract the jar content(e.g I used WinRar) then go to edu/stanford/nlp/models/ner directory you can find the ser.gz files for any model.

Related

vtk: Modelling examples not working (Delaunay3D, finance etc)

I'm new to vtk, and I've succesfully built vtk 8.1.1 from source, using Cmake and Visual Studio 2017, with the default options and examples.
I've already solved an issue with the Infovis folder examples.
Now, I'm trying to run the examples from the Modelling folder:
The problem is that when I try to run these examples, it opens a window that closes so fast I can't even see what it says, so I have no clue about the error.
The Delaunay3D.cxx file begins with these comments:
`// Delaunay3D
// Usage: Delaunay3D InputFile(.vtp) OutputFile(.vtu)
// where
// InputFile is an XML PolyData file with extension .vtp
// OutputFile is an XML Unstructured Grid file with extension .vtu
`
So it looks like I need external data files, and the same is true for the other examples. But, where do I get these files, and where do I place them?
Some of the examples in the source files are not complete i.e. as you found out, some of them require external input files which may be missing or mistakes in CMakeLists.txt etc. In the parent folder of the folder that you have attached screenshot of (i.e. the Modelling directory) there is also a folder for Python examples. In that folder, there is a Delaunay3D.py file which creates random points as input instead of reading them from file. So you can do the same. The names and signatures of functions in Python and C++ are the same by modifying the Delaunay3D.cxx code or adding some code in the TestDelaunay3D.cxx. But there is no such file for the finance example, unfortunately.
I find it useful to use VTK code along with Paraview. Paraview is built on top of VTK. It has most of the VTK filters available through the GUI. In Paraview you can also create some data and save it to file using File->Save Data. You can then use that as input for the examples. Once you become familiar with VTK file types and VTK sources, generating data does not require a lot of code. So you can do it yourself by modifying any of the example code (like it is done in the Delaunay3D.py).
About where to place the input files, in this particular case you can place them anywhere but when you run the executable that was built, you must enter the path of the input file correctly on the command line.
Updates based on comments:
The Python wrappers provide almost complete features available with the C++ version. The exceptions are noted here. If you decide to use VTK Python then a good resource to read is the VTK Numpy interface.
Paraview implements a majority of VTK filters and sources. So it can do a lot of creation and modification of geometries. In addition, you can use programmable filters and sources for doing things which are not available through Gui. In the programmable filters you can write any Python script which can import vtk and use all its functionality.
But if for your use case you only need a subset of the functionality Paraview provides then you may want to write your own GUI.

Dealing with missing module and inverter types with PVLib

I am looking through the SAM and CEC DBs for inverter and module types, as I am looking to do some forecasts.
As I don't find the correct types (SMA 2200CP and Canadian Solar CS6X310M), is there another resource to pull that data or can I create an addition to the dataframe when I export it from pvlib in python?
I am new, so please feel to correct me at any point.
pvlib-python should update their cec libraries, but in the meantime, you can download SAM from sam.nrel.gov, and access their updated libraries packaged with the newest version (2017.01.17 as of this writing). You can then specify those local files with the retrieve_sam function.
Note that the sam.nrel.gov website lists their libraries to be downloaded separately, but those are not the most recent versions. Probably the reason that the pvlib-python libraries haven't been updated is that they just check those files.

Sitecore package uninstall

What is the best way to uninstall a package or a module in Sitecore?
I've seen suggestions to do it manually, but it is not very convenient way, especially when there were many templates, items, layouts, renderings and static files.
You can use Sitecore Rocks to create an "anti-package."
https://www.sitecore.net/nl-be/learn/blogs/technical-blogs/trevor-campbell/posts/2013/02/28-days-of-sitecore-rocks-package-management-part-1.aspx
I have never tested the Package History module that was mentioned, so I cannot comment as to whether that approach works.
Open the .zip file for the original package and look through the XML to figure out what files the package installed. Then back up your site and remove files and configuration nodes the package installed(assuming you are confident you understand what purpose the files and nodes have and what other components may rely on them). The Package History module may be taking this same approach, but you need to be certain that what you are deleting is not going to break anything.
Otherwise, I would recommend restoring to a backup made before you installed the package.

Changing where Sitecore module is installed

I have a package I want to install. I would like the files to end up in a different directory than the installation wizard choses for them.
For example, my Sitecore copy is running at C:\SiteCore\website
The module added files to C:\SiteCore\website\Console
I would like the files to ultimately live at C:\SiteCore\website\sitecore_modules\Console
I am using Sitecore 6.5 rev 111230, but we are planning to upgrade very soon. I would like for my installed packages to migrate seamlessly once we have upgraded. For reference, the package I want to install at the moment is the Sitecore Powershell Extensions. Although, I would prefer to apply a similar method to any future packages that I install.
Is there a secret switch in the package installation process to allow me to do this? Can I do it from the package installation wizard? Is there another way to install packages?
I'm assuming I can't just change the package path and expect everything to keep working. Do I have to update a configuration somewhere (a file or inside the Sitecore CMS GUI) to make the package recognize the new file locations?
The module creator defines where files exist. If you move them you run the risk of something not working. The best idea is to ask the creator on the Marketplace page of the module.
There is no turn-key way to change this.
I guess you cand take the code from MarketPlace and you can modify it.
I don't know how exactly is the licenses with MarketPlace modules, but I think people can modify others code.
Please check on code and also on items, maybe on some fields are values for folder path.
I discovered a way to accomplish this, but it can be quite involved or even impossible, depending on the complexity and size of the package.
First of all, I did take the question to the module creator and had a very helpful and informative conversation with the creator. So thanks for that suggestion - they may even move the install location in a future release, based on my request.
The workaround is to first install the package on a system as normal. Then you figure out everything that comes with the package. For files, this is easy if your Sitecore root is under source control. For items, this is really complicated. You can search for the installed items by owner, if you had the foresight to create & use a unique user for the package installation. Or you can check the untyped files in the package that are essentially xml based item manifests.
Once you have a detailed list, you make the desired modifications to the locations. Then you recreate the package yourself using the Sitecore package designer.
This works for simple packages - I did it to one small package that I hope to get up on the Sitecore marketplace as shared source soon. And by small, I mean it was 2 files and 3 items. The package that prompted me to ask this question would not cooperate with this workaround. The included .dll had some assumptions about the file structure hard-coded into it.
The workaround I took for the more complex package was really quite basic: I just created a new source-code external to the required path. That let me wrap everything up neatly without getting medieval on the package files.
Thanks for both your answers, a very fine +1 to you.

where can I find 'pkunzip.cpp and pkunzip.h"?

somewhere, I found a simple source to read something, and that source includes
"PkunZip.cpp" and "Pkunzip.h" to read zip-file.
However, I could not find the website about PkunZip.cpp ( sourceforge or codeproject etc ).
where can I find the website that describe 'pkunzip.cpp' and a manual about it?
If you search google for either of these files nothing is returned. That is a pretty bad sign. If you need code to handle zip archives, I have used libarchive in the past with great success. Their website has great documentation and the code is cross platform (Windows, *BSD, Linux, etc).
You should be able to replace any missing functionality with libarchive.
The standard way of reading zip files is zlib, or considering you tagged c++, the zipios. But if you want your particular files, have you tried Google Codesearch?