Getting following Error in Sphinx 4.0- 'helloLinguist' property:'grammar' - mandatory property is not set - cmusphinx

I am using sphinx 4.0 recognizer.While am running my application for swapping two statically defined grammars at runtime, i am getting the error in ecllipse as " 'helloLinguist' property:'grammar' - mandatory property is not set! ". I am using the cofiguration xml file provided on the link http://cmusphinx.sourceforge.net/wiki/sphinx4:swappinggrammars. Please help.

You must have accidentally edited the configuration and removed/commented the entry, or you are removing the grammar element during runtime. In the configuration you linked the property is set:
<component name="helloLinguist"
type="edu.cmu.sphinx.linguist.flat.FlatLinguist">
<property name="grammar" value="helloGrammar"/>
</component>

Related

Solr Question about Loading Changes to Schema

I'm new to Solr and received the following error when adding a document through pysolr:
pysolr.SolrError: Solr responded with an error (HTTP 400): [Reason: ERROR: [doc=bc4aa768-6f35-4888-80e0-1578d9971b3c] Error adding field 'periodical_nlm'='2984692R' msg=For input string: "2984692R"]
I ended up finding out that the first periodical_nlm value added was 404536.0, so I assumed it was a type issue. In Python I then cast every periodical_nlm explicitly to string before adding 2984692R. However, the error persisted.
I Googled a bit and found that I should probably explicitly tell Solr that I want that field to be a string. I've not gotten very "hands on" with the schema yet, so I just had some questions:
(1) There appear to be two schema files: managed-schema in the directory for the core and managed-schema in the conf folder of the core. I'm assuming that the initialized schema which is in use is the one in the conf folder?
(2) Which do I update in order for things to proceed smoothly? I attempted adding the following to the schema file in the core directory but the error persisted:
field name="periodical_nlm" type="string" indexed="true" stored="true" required="false" multiValued="false" />
Do I need to rerun some initialization process or add something to the conf file separately?
Thank you so much and please let me know if you need more info. I'm running on a Windows 10 Home x64 platform (not sure if that's important if there are any command-line things I need to run...).
As long as you reload the core after changing the managed-schema file under conf, you should be fine. Be aware that you should do this before indexing content - so you might need to clean out the index by deleting everything, then changing the schema and re-indexing your content. Changing the schema does not change content that has already been indexed.
Otherwise your assumption is correct, and the schemaless mode (where the type is determined by the format of the first value submitted (not the type - as that's usually not included in any way, all values are just strings when being submitted, so Solr attempts to guess the type by applying a hierarchy of pattern matching)) is useful for prototyping - when you're moving to production you should always define the schema explicitly to avoid issues like you've seen here.

Node.js coding assistance is disabled and cannot be turned on [IntelliJ 2019.3]

Coding assistance doesn't turn on, even if node js related stuff is recognized. I've also tried node v12 but same sad story.
If I check the "Coding assistance for Node.js", it lets me select the module but then it un-checks itself.
I've already tried other solutions found in some similar (but old) topics, but none of them worked.
I had the same problem on Windows 10. When I downgraded NodeJS to node-v11.15.0-x64, I was able to check the box without it unchecking itself.
If I check the "Coding assistance for Node.js", it lets me select the
module but then it un-checks itself.
You can try this (it works for me, I am using nodejs 13.14.0):
Close PHPstorm
You need in the .idea folder to create a jsLibraryMappings.xml file with the next content:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptLibraryMappings">
<includedPredefinedLibrary name="Node.js Core" />
</component>
</project>
Find the line with the following component in the workspace.xml file:
<component name = "PropertiesComponent">
Add the following property for this component (You may need to specify the version of your node):
<property name="javascript.nodejs.core.library.configured.version" value="13.14.0" />
Sorry, I am using a translator
I had the same problem and found out I did not activate the NodeJS plugin.

How to fix oData VDM generator error «trying to create the same field twice»?

I use SAP Cloud SDK 2.19.1 and odata-generator-maven-plugin:2.19.1.
When I try to generate VDM by metadata-file from oData service /sap/opu/odata/sap/API_PRODUCT_SRV I get an error during the execution of a command mvn clean install:
Error: URI=file:/D:/opensap/firstapp/application/edmx/ApiProductSrv.edmx Line=1: Document root element "edmx:Edmx", must match DOCTYPE root "null".
Error: URI=file:/D:/opensap/firstapp/application/edmx/ApiProductSrv.edmx Line=1: Document is invalid: no grammar found.
…
[ERROR] Failed to execute goal com.sap.cloud.s4hana.datamodel:odata-generator-maven-plugin:2.19.1:generate (generate-consumption) on project firstapp-application: Execution generate-consumption of goal com.sap.cloud.s4hana.datamodel:odata-generator-maven-plugin:2.1
9.1:generate failed: trying to create the same field twice: Продукт -> [Help 1]
I use the metadata-file obtained at the address /sap/opu/odata/sap/API_PRODUCT_SRV/$metadata, but it contains Russian-language text. For example, in sap-annotations:
<Property Name="Product" Type="Edm.String" Nullable="false" MaxLength="40" sap:display-format="UpperCase" sap:label="Продукт" sap:quickinfo="Номер продукта"/>
When I specify the locale when retrieving the metadata file ($metadata?sap-language=EN), it is possible to generate VDM.
But is it possible to generate correct VDM by metadata-file without special instructions sap-language?
Thanks!
For the generated code the locale does not really matter. Therefore, we suggest you use explicitly the English locale to retrieve the metadata.
The tutorial of the SAP Cloud SDK implicitly assume that the default locale of your system is English.

Xamarin.iOS versioning during build

I've been trying to get an automatic versioning system going for builds (mainly due to external crash analytics picking up each build as the same until I change the version manually). The format is simple, I take the CFBundleShortVersionString from the Info.plist, and append the current date and time (in yyyyMMddmmss format) as subversion.
The task I've put together for this:
<Project>
<Target Name="BeforeBuild">
<XmlPeek XmlInputPath="$(ProjectDir)Info.plist" Query="//dict/key[. = 'CFBundleShortVersionString']/following-sibling::string[1]">
<Output TaskParameter="Result" ItemName="VersionNumber" />
</XmlPeek>
<PropertyGroup>
<BuildNumber>$([System.DateTime]::Now.ToString(yyyyMMddmmss))</BuildNumber>
</PropertyGroup>
<XmlPoke XmlInputPath="$(ProjectDir)Info.plist" Query="//dict/key[. = 'CFBundleVersion']/following-sibling::string[1]" Value="$(VersionNumber).$(BuildNumber)" />
</Target>
</Project>
However it fails with the following error:
Target BeforeBuild:
[...]/[...].csproj(1069,5): error MSB3733: Input file "[...]/Info.plist" cannot be opened. For security reasons DTD is prohibited in this XML document. To enable DTD processing set the DtdProcessing property on XmlReaderSettings to Parse and pass the settings into XmlReader.Create method.
Done building target "BeforeBuild" in project "[...].csproj" -- FAILED.
What am I doing wrong? There's not much info about this error, at least not much that I could find and would help fixing it.

Distribute SQL_SSDT Code Snippets using vscontent (lang attribute error)

I'm trying to distribute some SQL_SSDT Visual Studio code snippets using .vsi and .vscontent files, but I'm getting an error while installing:
The .vscontent file either contains invalid attributes or specifies a code snippet for a programming language that is not installed.
The .vscontent file is based on the documentation provided by Microsoft How to: Distribute Code Snippets
The sample on this site is the following:
<VSContent xmlns="http://schemas.microsoft.com/developer/vscontent/2005">
<Content>
<FileName> </FileName>
<DisplayName> </DisplayName>
<Description> </Description>
<FileContentType> </FileContentType>
<ContentVersion>2.0</ContentVersion>
<Attributes>
<Attribute name="lang" value=""/>
</Attributes>
</Content>
</VSContent>
My file looks like this:
<VSContent xmlns="http://schemas.microsoft.com/developer/vscontent/2005">
<Content>
<FileName>SSDTTest.snippet</FileName>
<DisplayName>SSDTTest</DisplayName>
<Description>SSDTTest</Description>
<FileContentType>Code Snippet</FileContentType>
<ContentVersion>1.0</ContentVersion>
<Attributes>
<Attribute name="lang" value="SQL_SSDT"/>
</Attributes>
</Content>
</VSContent>
I'm using the value SQL_SSDT since this is the required value in the .snippet files (<Code Language="SQL_SSDT">).
The installation starts as expected (double clicking on the .vsi file), the VS Content Installer pops up, lists the included content. The error occurs after hitting Finish. (Installation starts, but the above error pops up after a few seconds.)
The snippet is working fine if I copy it to the default snippet folder for SSDT (Documents\Visual Studio 2012\Code Snippets\SQL_SSDT\My Code Snippets) or if I'm adding it via snippet manager in SSDT, but the .vsi installation fails using the above file.
Am I missing something?
Installed VS products on this box:
SSDT
SSDT-BI
VS Express for Desktop (2012)
Update
I found the XML schema reference for the .vscontent files (VS2012), and it seems that the SQL_SSDT is not a valid value for the Lang attribute. It suggests that there are only four values available for the lang attribute. (csharp, jsharp, vb, xml).
Now the question is: Does SSDT add any extensions to this XML schema?
It seems that VS Content Installer has no support for deploying SSDT code snippets. There is a posted idea on visualstudio.uservoice.com which requests this feature, but it is still open.
I did not found any other resources related to this issue.
There is a possible workaround, which needs testing: You can create a PS/BAT which copies the snippet files into the VS's snippet folder for SSDT.

Resources